Ryzom Account Management System
1.0
|
class that handles most ticket related functions. More...
Public Member Functions | |
__construct () | |
A constructor. | |
set ($values) | |
sets the object's attributes. | |
create () | |
creates a new 'ticket' entry. | |
load_With_TId ($id) | |
loads the object's attributes. | |
update () | |
update the objects attributes to the db. | |
hasInfo () | |
check if a ticket has a ticket_info page or not. | |
getTId () | |
get tId attribute of the object. | |
getTimestamp () | |
get timestamp attribute of the object in the format defined in the outputTime function of the Helperclass. | |
getTitle () | |
get title attribute of the object. | |
getStatus () | |
get status attribute of the object. | |
getStatusText () | |
get status attribute of the object in the form of text (string). | |
getCategoryName () | |
get category attribute of the object in the form of text (string). | |
getQueue () | |
get queue attribute of the object. | |
getTicket_Category () | |
get ticket_category attribute of the object (int). | |
getAuthor () | |
get author attribute of the object (int). | |
getPriority () | |
get priority attribute of the object (int). | |
getPriorityText () | |
get priority attribute of the object in the form of text (string). | |
getAssigned () | |
get the user assigned to the ticket. | |
getForwardedGroupName () | |
get the name of the support group to whom the ticket is forwarded or return 0 in case not forwarded. | |
getForwardedGroupId () | |
get the id of the support group to whom the ticket is forwarded or return 0 in case not forwarded. | |
setTId ($id) | |
set tId attribute of the object. | |
setTimestamp ($ts) | |
set timestamp attribute of the object. | |
setTitle ($t) | |
set title attribute of the object. | |
setStatus ($s) | |
set status attribute of the object. | |
setQueue ($q) | |
set queue attribute of the object. | |
setTicket_Category ($tc) | |
set ticket_category attribute of the object. | |
setAuthor ($a) | |
set author attribute of the object. | |
setPriority ($p) | |
set priority attribute of the object. | |
Static Public Member Functions | |
static | ticketExists ($id) |
check if a ticket exists. | |
static | getStatusArray () |
return an array of the possible statuses | |
static | getPriorityArray () |
return an array of the possible priorities | |
static | getEntireTicket ($id, $view_as_admin) |
return an entire ticket. | |
static | getTicketsOf ($author) |
return all tickets of a specific user. | |
static | create_Ticket ($title, $content, $category, $author, $real_author, $for_support_group=0, $extra_info=0) |
function that creates a new ticket. | |
static | updateTicketStatus ($ticket_id, $newStatus, $author) |
updates the ticket's status. | |
static | updateTicketStatusAndPriority ($ticket_id, $newStatus, $newPriority, $author) |
updates the ticket's status & priority. | |
static | getLatestReply ($ticket_id) |
return the latest reply of a ticket | |
static | createReply ($content, $author, $ticket_id, $hidden) |
create a new reply for a ticket. | |
static | assignTicket ($user_id, $ticket_id) |
assign a ticket to a user. | |
static | unAssignTicket ($user_id, $ticket_id) |
unassign a ticket of a user. | |
static | forwardTicket ($user_id, $ticket_id, $group_id) |
forward a ticket to a specific support group. | |
Private Attributes | |
$tId | |
The id of ticket. | |
$timestamp | |
Timestamp of the ticket. | |
$title | |
Title of the ticket. | |
$status | |
Status of the ticket (0 = waiting on user reply, 1 = waiting on support, (2= not used atm), 3 = closed. | |
$queue | |
(not in use atm) | |
$ticket_category | |
the id of the category belonging to the ticket | |
$author | |
The ticket_users id. | |
$priority | |
The priority of the ticket where 0 = low, 3= supadupahigh. |
class that handles most ticket related functions.
the ticket class is used for most ticketing related functions, it also holds some wrapper functions.
__construct | ( | ) |
A constructor.
Empty constructor
static assignTicket | ( | $ | user_id, |
$ | ticket_id | ||
) | [static] |
assign a ticket to a user.
Checks if the ticket exists, if so then it will try to assign the user to it, a log entry will be written about this.
$user_id | the id of user trying to be assigned to the ticket. |
$ticket_id | the id of the ticket that we try to assign to the user. |
create | ( | ) |
creates a new 'ticket' entry.
this method will use the object's attributes for creating a new 'ticket' entry in the database.
static create_Ticket | ( | $ | title, |
$ | content, | ||
$ | category, | ||
$ | author, | ||
$ | real_author, | ||
$ | for_support_group = 0 , |
||
$ | extra_info = 0 |
||
) | [static] |
function that creates a new ticket.
A new ticket will be created, in case the extra_info != 0 and the http request came from ingame, then a ticket_info page will be created. A log entry will be written, depending on the $real_authors value. In case the for_support_group parameter is set, the ticket will be forwarded immediately. Also the mail handler will create a new email that will be sent to the author to notify him that his ticket is freshly created.
$title | the title we want to give to the ticket. |
$content | the content we want to give to the starting post of the ticket. |
$category | the id of the category that should be related to the ticket. |
$author | the person who's id will be stored in the database as creator of the ticket. |
$real_author | should be the same id, or a moderator/admin who creates a ticket for another user (this is used for logging purposes). |
$for_support_group | in case you directly want to forward the ticket after creating it. (default value = 0 = don't forward) |
$extra_info | used for creating an ticket_info page related to the ticket, this only happens when the ticket is made ingame. |
static createReply | ( | $ | content, |
$ | author, | ||
$ | ticket_id, | ||
$ | hidden | ||
) | [static] |
create a new reply for a ticket.
A reply will only be added if the content isn't empty and if the ticket isn't closed. The ticket creator will be notified by email that someone else replied on his ticket.
$content | the content of the reply |
$author | the author of the reply |
$ticket_id | the id of the ticket to which we want to add the reply. |
$hidden | boolean that specifies if the reply should only be shown to mods/admins or all users. |
static forwardTicket | ( | $ | user_id, |
$ | ticket_id, | ||
$ | group_id | ||
) | [static] |
forward a ticket to a specific support group.
Checks if the ticket exists, if so then it will try to forward the ticket to the support group specified, a log entry will be written about this. if no log entry should be written then the user_id should be 0, else te $user_id will be used in the log to specify who forwarded it.
$user_id | the id of user trying to forward the ticket. |
$ticket_id | the id of the ticket that we try to forward to a support group. |
$group_id | the id of the support group. |
getAssigned | ( | ) |
get the user assigned to the ticket.
or return 0 in case not assigned.
getAuthor | ( | ) |
get author attribute of the object (int).
getCategoryName | ( | ) |
get category attribute of the object in the form of text (string).
static getEntireTicket | ( | $ | id, |
$ | view_as_admin | ||
) | [static] |
return an entire ticket.
returns the ticket object and an array of all replies to that ticket.
$id | the id of the ticket. |
$view_as_admin | true if the viewer of the ticket is a mod, else false (depending on this it will also show the hidden comments) |
get the id of the support group to whom the ticket is forwarded or return 0 in case not forwarded.
get the name of the support group to whom the ticket is forwarded or return 0 in case not forwarded.
static getLatestReply | ( | $ | ticket_id | ) | [static] |
return the latest reply of a ticket
$ticket_id | the id of the ticket. |
getPriority | ( | ) |
get priority attribute of the object (int).
static getPriorityArray | ( | ) | [static] |
return an array of the possible priorities
getPriorityText | ( | ) |
get priority attribute of the object in the form of text (string).
getQueue | ( | ) |
get queue attribute of the object.
getStatus | ( | ) |
get status attribute of the object.
static getStatusArray | ( | ) | [static] |
return an array of the possible statuses
getStatusText | ( | ) |
get status attribute of the object in the form of text (string).
get ticket_category attribute of the object (int).
static getTicketsOf | ( | $ | author | ) | [static] |
return all tickets of a specific user.
an array of all tickets created by a specific user are returned by this function.
$author | the id of the user of whom we want all tickets from. |
getTId | ( | ) |
get tId attribute of the object.
getTimestamp | ( | ) |
get timestamp attribute of the object in the format defined in the outputTime function of the Helperclass.
getTitle | ( | ) |
get title attribute of the object.
hasInfo | ( | ) |
check if a ticket has a ticket_info page or not.
load_With_TId | ( | $ | id | ) |
loads the object's attributes.
loads the object's attributes by giving a TId (ticket id).
$id | the id of the ticket that should be loaded |
set | ( | $ | values | ) |
sets the object's attributes.
$values | should be an array of the form array('TId' => ticket_id, 'Title' => title, 'Status'=> status, 'Timestamp' => ts, 'Queue' => queue, 'Ticket_Category' => tc, 'Author' => author, 'Priority' => priority). |
setAuthor | ( | $ | a | ) |
set author attribute of the object.
$a | author of the ticket |
setPriority | ( | $ | p | ) |
set priority attribute of the object.
$p | priority of the ticket |
setQueue | ( | $ | q | ) |
set queue attribute of the object.
$q | queue of the ticket |
setStatus | ( | $ | s | ) |
set status attribute of the object.
$s | status of the ticket(int) |
setTicket_Category | ( | $ | tc | ) |
set ticket_category attribute of the object.
$tc | ticket_category id of the ticket(int) |
setTId | ( | $ | id | ) |
set tId attribute of the object.
$id | integer id of the ticket |
setTimestamp | ( | $ | ts | ) |
set timestamp attribute of the object.
$ts | timestamp of the ticket |
setTitle | ( | $ | t | ) |
set title attribute of the object.
$t | title of the ticket |
static ticketExists | ( | $ | id | ) | [static] |
check if a ticket exists.
$id | the id of the ticket to be checked. |
static unAssignTicket | ( | $ | user_id, |
$ | ticket_id | ||
) | [static] |
unassign a ticket of a user.
Checks if the ticket exists, if so then it will try to unassign the user of it, a log entry will be written about this.
$user_id | the id of user trying to be assigned to the ticket. |
$ticket_id | the id of the ticket that we try to assign to the user. |
update | ( | ) |
update the objects attributes to the db.
static updateTicketStatus | ( | $ | ticket_id, |
$ | newStatus, | ||
$ | author | ||
) | [static] |
updates the ticket's status.
A log entry about this will be created only if the newStatus is different from the current status.
$ticket_id | the id of the ticket of which we want to change the status. |
$newStatus | the new status value (integer) |
$author | the user (id) that performed the update status action |
static updateTicketStatusAndPriority | ( | $ | ticket_id, |
$ | newStatus, | ||
$ | newPriority, | ||
$ | author | ||
) | [static] |
updates the ticket's status & priority.
A log entry about this will be created only if the newStatus is different from the current status and also when the newPriority is different from the current priority.
$ticket_id | the id of the ticket of which we want to change the status & priority |
$newStatus | the new status value (integer) |
$newPriority | the new priority value (integer) |
$author | the user (id) that performed the update |
$author [private] |
The ticket_users id.
$priority [private] |
The priority of the ticket where 0 = low, 3= supadupahigh.
$queue [private] |
(not in use atm)
$status [private] |
Status of the ticket (0 = waiting on user reply, 1 = waiting on support, (2= not used atm), 3 = closed.
$ticket_category [private] |
the id of the category belonging to the ticket
$tId [private] |
The id of ticket.
$timestamp [private] |
Timestamp of the ticket.
$title [private] |
Title of the ticket.