Ryzom Account Management System
1.0
|
Class that handles the logging. More...
Public Member Functions | |
__construct () | |
A constructor. | |
set ($values) | |
sets the object's attributes. | |
load_With_TLogId ($id) | |
loads the object's attributes. | |
update () | |
update attributes of the object to the DB. | |
getTLogId () | |
get tLogId attribute of the object. | |
getTimestamp () | |
get timestamp attribute of the object. | |
getQuery () | |
get query attribute of the object. | |
getAuthor () | |
get author attribute of the object. | |
getTicket () | |
get ticket attribute of the object. | |
getAction () | |
get the action id out of the query by decoding it. | |
getArgument () | |
get the argument out of the query by decoding it. | |
getActionTextArray () | |
get the action text(string) array. | |
setTLogId ($id) | |
set tLogId attribute of the object. | |
setTimestamp ($t) | |
set timestamp attribute of the object. | |
setQuery ($q) | |
set query attribute of the object. | |
setAuthor ($a) | |
set author attribute of the object. | |
setTicket ($t) | |
set ticket attribute of the object. | |
Static Public Member Functions | |
static | getLogsOfTicket ($ticket_id) |
return all log entries related to a ticket. | |
static | createLogEntry ($ticket_id, $author_id, $action, $arg=-1) |
create a new log entry. | |
static | constr_TLogId ($id) |
return constructed element based on TLogId | |
static | getAllLogs ($ticket_id) |
return all log entries related to a ticket. | |
Private Attributes | |
$tLogId | |
The id of the log entry. | |
$timestamp | |
The timestamp of the log entry. | |
$query | |
The query (json encoded array containing action id & argument) | |
$author | |
author of the log | |
$ticket | |
the id of the ticket related to the log entry |
Class that handles the logging.
The logging will be used when a ticket is created, a reply is added, if someone views a ticket, if someone assigns a ticket to him or if someone forwards a ticket. This class provides functions to get retrieve those logs and also make them.
-the Action IDs being used are:
__construct | ( | ) |
A constructor.
Empty constructor
static constr_TLogId | ( | $ | id | ) | [static] |
return constructed element based on TLogId
$id | ticket_log id of the entry that we want to load into our object. |
static createLogEntry | ( | $ | ticket_id, |
$ | author_id, | ||
$ | action, | ||
$ | arg = -1 |
||
) | [static] |
create a new log entry.
It will check if the $TICKET_LOGGING global var is true, this var is used to turn logging on and off. In case it's on, the log message will be stored. the action id and argument (which is -1 by default), will be json encoded and stored in the query field in the db.
$ticket_id | the id of the ticket related to the new log entry |
$author_id | the id of the user that instantiated the logging. |
$action | the action id (see the list in the class description) |
$arg | argument for the action (default = -1) |
getAction | ( | ) |
get the action id out of the query by decoding it.
get the action text(string) array.
this is being read from the language .ini files.
static getAllLogs | ( | $ | ticket_id | ) | [static] |
return all log entries related to a ticket.
$ticket_id | the id of the ticket of which we want all related log entries returned. |
getArgument | ( | ) |
get the argument out of the query by decoding it.
getAuthor | ( | ) |
get author attribute of the object.
static getLogsOfTicket | ( | $ | ticket_id | ) | [static] |
return all log entries related to a ticket.
$ticket_id | the id of the ticket of which we want all related log entries returned. |
getQuery | ( | ) |
get query attribute of the object.
getTicket | ( | ) |
get ticket attribute of the object.
getTimestamp | ( | ) |
get timestamp attribute of the object.
getTLogId | ( | ) |
get tLogId attribute of the object.
load_With_TLogId | ( | $ | id | ) |
loads the object's attributes.
loads the object's attributes by giving a ticket_log entries ID (TLogId).
id | the id of the ticket_log entry that should be loaded |
set | ( | $ | values | ) |
sets the object's attributes.
$values | should be an array. |
setAuthor | ( | $ | a | ) |
set author attribute of the object.
$a | integer id of the user who created the log entry |
setQuery | ( | $ | q | ) |
set query attribute of the object.
$q | the encoded query |
setTicket | ( | $ | t | ) |
set ticket attribute of the object.
$t | integer id of ticket of which the log entry is related to. |
setTimestamp | ( | $ | t | ) |
set timestamp attribute of the object.
$t | timestamp of the log entry |
setTLogId | ( | $ | id | ) |
set tLogId attribute of the object.
$id | integer id of the log entry |
update | ( | ) |
update attributes of the object to the DB.
$author [private] |
author of the log
$query [private] |
The query (json encoded array containing action id & argument)
$ticket [private] |
the id of the ticket related to the log entry
$timestamp [private] |
The timestamp of the log entry.
$tLogId [private] |
The id of the log entry.