![]() |
Ryzom Account Management System
1.0
|
Handles the assigning of a ticket to a user. More...
Public Member Functions | |
| __construct () | |
| A constructor. | |
| set ($values) | |
| sets the object's attributes. | |
| create () | |
| creates a new 'assigned' entry. | |
| delete () | |
| deletes an existing 'assigned' entry. | |
| load ($ticket_id) | |
| loads the object's attributes. | |
| getUser () | |
| get user attribute of the object. | |
| getTicket () | |
| get ticket attribute of the object. | |
| setUser ($u) | |
| set user attribute of the object. | |
| setTicket ($t) | |
| set ticket attribute of the object. | |
Static Public Member Functions | |
| static | assignTicket ($user_id, $ticket_id) |
| Assigns a ticket to a user or returns an error message. | |
| static | unAssignTicket ($user_id, $ticket_id) |
| Unassign a ticket being coupled to a user or return an error message. | |
| static | getUserAssignedToTicket ($ticket_id) |
| Get the (external) id of the user assigned to a ticket. | |
| static | isAssigned ($ticket_id, $user_id=0) |
| Check if a ticket is already assigned (in case the user_id param is used, it will check if it's assigned to that user) | |
Private Attributes | |
| $user | |
| The id of the user being assigned. | |
| $ticket | |
| The id of the ticket being assigned. | |
Handles the assigning of a ticket to a user.
This is being used to make someone responsible for the handling and solving of a ticket. The idea is that someone can easily assign a ticket to himself and by doing that, he makes aware to the other moderators that he will deal with the ticket in the future.
| __construct | ( | ) |
A constructor.
Empty constructor
| static assignTicket | ( | $ | user_id, |
| $ | ticket_id | ||
| ) | [static] |
Assigns a ticket to a user or returns an error message.
It will first check if the ticket isn't already assigned, if not, it will create a new 'assigned' entry.
| $user_id | the id of the user we want to assign to the ticket |
| $ticket_id | the id of the ticket. |
| create | ( | ) |
creates a new 'assigned' entry.
this method will use the object's attributes for creating a new 'assigned' entry in the database.
| delete | ( | ) |
deletes an existing 'assigned' entry.
this method will use the object's attributes for deleting an existing 'assigned' entry in the database.
| getTicket | ( | ) |
get ticket attribute of the object.
| getUser | ( | ) |
get user attribute of the object.
| static getUserAssignedToTicket | ( | $ | ticket_id | ) | [static] |
Get the (external) id of the user assigned to a ticket.
| $ticket_id | the Id of the ticket that's being queried |
| static isAssigned | ( | $ | ticket_id, |
| $ | user_id = 0 |
||
| ) | [static] |
Check if a ticket is already assigned (in case the user_id param is used, it will check if it's assigned to that user)
| $ticket_id | the Id of the ticket that's being queried |
| $user_id | the id of the user, default parameter = 0, by using a user_id, it will check if that user is assigned to the ticket. |
| load | ( | $ | ticket_id | ) |
loads the object's attributes.
loads the object's attributes by giving a ticket_id, it will put the matching user_id and the ticket_id into the attributes.
| $ticket_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('User' => user_id, 'Ticket' => ticket_id). |
| setTicket | ( | $ | t | ) |
set ticket attribute of the object.
| $t | integer id of the ticket |
| setUser | ( | $ | u | ) |
set user attribute of the object.
| $u | integer id of the user |
| static unAssignTicket | ( | $ | user_id, |
| $ | ticket_id | ||
| ) | [static] |
Unassign a ticket being coupled to a user or return an error message.
It will first check if the ticket is assigned, if this is indeed the case it will delete the 'assigned' entry.
| $user_id | the id of the user we want to unassign from the ticket |
| $ticket_id | the id of the ticket. |
$ticket [private] |
The id of the ticket being assigned.
$user [private] |
The id of the user being assigned.
1.7.6.1