CMS  Version 3.9
error_log.inc
Go to the documentation of this file.
1 <?php
8 class ErrorLog extends DataItem
9 {
10  // Fields
11 
12  var $fields = array("error_log_id" => Number,
13  "code" => Number,
14  "message" => HTML,
15  "file" => String,
16  "line" => Number,
17  "details" => HTML,
18  "user_id" => Number,
19  "uri" => String,
20  "referer" => String,
21  "session" => String,
22  "timestamp" => Timestamp);
23 
24  var $relations = array("User" => "");
25 
26  function User()
27  {
28 
29  $mgr = new UserManager();
30  return $mgr->getUser($this->user_id);
31  }
32 
33  function getUserFullName()
34  {
35  $u = $this->User();
36  if ($u) { return "$u->first_name $u->last_name"; }
37  }
38 
39  function ErrorLog()
40  {
41  $this->primary_key = "error_log_id";
42  $this->table = "error_log";
43  $this->default_format = "{message}";
44 
45  // Patch in the user class, since this can be overridden by the application
46  $mgr = new UserManager();
47  $this->relations["User"] = $mgr->getUserClass();
48 
49  $this->DataItem(func_get_args());
50  }
51 }
52 ?>
ErrorLog()
Definition: error_log.inc:39
getUserFullName()
Definition: error_log.inc:33
Provides the interface to the user model for the application.
$feedback user_id
Definition: save.inc:14