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

handles functions related to replies on tickets. More...

Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 create ()
 creates a new 'ticket_reply' entry.
 load_With_TReplyId ($id)
 loads the object's attributes.
 update ()
 updates a ticket_reply entry based on the objects attributes.
 getTicket ()
 get ticket attribute of the object.
 getContent ()
 get content attribute of the object.
 getAuthor ()
 get author attribute of the object.
 getTimestamp ()
 get timestamp attribute of the object.
 getTReplyId ()
 get tReplyId attribute of the object.
 getHidden ()
 get hidden attribute of the object.
 setTicket ($t)
 set ticket attribute of the object.
 setContent ($c)
 set content attribute of the object.
 setAuthor ($a)
 set author attribute of the object.
 setTimestamp ($t)
 set timestamp attribute of the object.
 setTReplyId ($i)
 set tReplyId attribute of the object.
 setHidden ($h)
 set hidden attribute of the object.

Static Public Member Functions

static constr_TReplyId ($id)
 return constructed element based on TReplyId.
static getRepliesOfTicket ($ticket_id, $view_as_admin)
 return all replies on a specific ticket.
static createReply ($content, $author, $ticket_id, $hidden, $ticket_creator)
 creates a new reply on a ticket.

Private Attributes

 $tReplyId
 The id of the reply.
 $ticket
 the ticket id related to the reply
 $content
 the content of the reply
 $author
 The id of the user that made the reply.
 $timestamp
 The timestamp of the reply.
 $hidden
 indicates if reply should be hidden for normal users or not

Detailed Description

handles functions related to replies on tickets.

Author:
Daan Janssens, mentored by Matthew Lagoe

Constructor & Destructor Documentation

A constructor.

Empty constructor


Member Function Documentation

static constr_TReplyId ( id) [static]

return constructed element based on TReplyId.

Parameters:
$idthe Id the reply we want to load.
Returns:
the loaded object.
create ( )

creates a new 'ticket_reply' entry.

this method will use the object's attributes for creating a new 'ticket_reply' entry in the database (the now() function will create the timestamp).

static createReply ( content,
author,
ticket_id,
hidden,
ticket_creator 
) [static]

creates a new reply on a ticket.

Creates a ticket_content entry and links it with a new created ticket_reply, a log entry will be written about this. In case the ticket creator replies on a ticket, he will set the status by default to 'waiting on support'.

Parameters:
$contentthe content of the reply
$authorthe id of the reply creator.
$ticket_idthe id of the ticket of which we want the replies.
$hiddenshould be 0 or 1
$ticket_creatorthe ticket's starter his id.
getAuthor ( )

get author attribute of the object.

get content attribute of the object.

getHidden ( )

get hidden attribute of the object.

static getRepliesOfTicket ( ticket_id,
view_as_admin 
) [static]

return all replies on a specific ticket.

Parameters:
$ticket_idthe id of the ticket of which we want the replies.
$view_as_adminif the browsing user is an admin/mod it should be 1, this will also show the hidden replies.
Returns:
an array with ticket_reply objects (beware the author and content are objects on their own, not integers!)
getTicket ( )

get ticket attribute of the object.

get timestamp attribute of the object.

The output format is defined by the Helpers class function, outputTime().

get tReplyId attribute of the object.

load_With_TReplyId ( id)

loads the object's attributes.

loads the object's attributes by giving a ticket_reply's id.

Parameters:
$idthe id of the ticket_reply 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
setContent ( c)

set content attribute of the object.

Parameters:
$cinteger id of the ticket_content entry
setHidden ( h)

set hidden attribute of the object.

Parameters:
$hshould be 0 or 1
setTicket ( t)

set ticket attribute of the object.

Parameters:
$tinteger id of the ticket
setTimestamp ( t)

set timestamp attribute of the object.

Parameters:
$ttimestamp of the reply
setTReplyId ( i)

set tReplyId attribute of the object.

Parameters:
$iinteger id of the ticket_reply
update ( )

updates a ticket_reply entry based on the objects attributes.


Field Documentation

$author [private]

The id of the user that made the reply.

$content [private]

the content of the reply

$hidden [private]

indicates if reply should be hidden for normal users or not

$ticket [private]

the ticket id related to the reply

$timestamp [private]

The timestamp of the reply.

$tReplyId [private]

The id of the reply.


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