Ryzom Account Management System  1.0
Public Member Functions | Static Public Member Functions | Private Attributes
Ticket_Log Class Reference

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

Detailed Description

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:

  1. User X Created ticket
  2. Admin X created ticket for arg
  3. Read ticket
  4. Added Reply ID: arg to ticket
  5. Changed status to arg
  6. Changed Priority to arg
  7. assigned to the ticket
  8. forwarded ticket to support group arg
  9. unassigned to the ticket
Author:
Daan Janssens, mentored by Matthew Lagoe

Constructor & Destructor Documentation

A constructor.

Empty constructor


Member Function Documentation

static constr_TLogId ( id) [static]

return constructed element based on TLogId

Parameters:
$idticket_log id of the entry that we want to load into our object.
Returns:
constructed ticket_log 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.

Parameters:
$ticket_idthe id of the ticket related to the new log entry
$author_idthe id of the user that instantiated the logging.
$actionthe action id (see the list in the class description)
$argargument 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.

Parameters:
$ticket_idthe id of the ticket of which we want all related log entries returned.
Returns:
an array of ticket_log objects, here the author is an integer.
Todo:
only use one of the 2 comparable functions in the future and make the other depricated.

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.

Parameters:
$ticket_idthe id of the ticket of which we want all related log entries returned.
Returns:
an array of ticket_log objects, be aware that the author in the ticket_log object is a ticket_user object on its own (so not a simple integer).
getQuery ( )

get query attribute of the object.

getTicket ( )

get ticket attribute of the object.

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).

Parameters:
idthe id of the ticket_log entry that should be loaded
set ( values)

sets the object's attributes.

Parameters:
$valuesshould be an array.
setAuthor ( a)

set author attribute of the object.

Parameters:
$ainteger id of the user who created the log entry
setQuery ( q)

set query attribute of the object.

Parameters:
$qthe encoded query
setTicket ( t)

set ticket attribute of the object.

Parameters:
$tinteger id of ticket of which the log entry is related to.
setTimestamp ( t)

set timestamp attribute of the object.

Parameters:
$ttimestamp of the log entry
setTLogId ( id)

set tLogId attribute of the object.

Parameters:
$idinteger id of the log entry
update ( )

update attributes of the object to the DB.


Field Documentation

$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.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables