Ryzom Account Management System
1.0
|
groups moderators & admins together. More...
Public Member Functions | |
__construct () | |
A constructor. | |
set ($values) | |
sets the object's attributes. | |
create () | |
creates a new 'support_group' entry. | |
load_With_SGroupId ($id) | |
loads the object's attributes. | |
update () | |
update the objects attributes to the db. | |
delete () | |
deletes an existing 'support_group' entry. | |
getSGroupId () | |
get sGroupId attribute of the object. | |
getName () | |
get name attribute of the object. | |
getTag () | |
get tag attribute of the object. | |
getGroupEmail () | |
get groupEmail attribute of the object. | |
getIMAP_MailServer () | |
get iMAP_MailServer attribute of the object. | |
getIMAP_Username () | |
get iMAP_Username attribute of the object. | |
getIMAP_Password () | |
get iMAP_Password attribute of the object. | |
setSGroupId ($id) | |
set sGroupId attribute of the object. | |
setName ($n) | |
set name attribute of the object. | |
setTag ($t) | |
set tag attribute of the object. | |
setGroupEmail ($ge) | |
set groupEmail attribute of the object. | |
setIMAP_MailServer ($ms) | |
set iMAP_MailServer attribute of the object. | |
setIMAP_Username ($u) | |
set iMAP_Username attribute of the object. | |
setIMAP_Password ($p) | |
set iMAP_Password attribute of the object. | |
Static Public Member Functions | |
static | getGroup ($id) |
return a specific support_group object. | |
static | getGroups () |
return all support_group objects. | |
static | createSupportGroup ($name, $tag, $groupemail, $imap_mailserver, $imap_username, $imap_password) |
Wrapper for creating a support group. | |
static | supportGroup_EntryNotExists ($name, $tag) |
check if support group name/tag doesn't exist yet. | |
static | supportGroup_Exists ($id) |
check if support group entry coupled to a given id exist or not. | |
static | constr_SGroupId ($id) |
construct an object based on the SGroupId. | |
static | getAllUsersOfSupportGroup ($group_id) |
get list of all users that are enlisted to a support group. | |
static | deleteSupportGroup ($group_id) |
wrapper for deleting a support group. | |
static | deleteUserOfSupportGroup ($user_id, $group_id) |
wrapper for deleting a user that's in a specified support group. | |
static | addUserToSupportGroup ($user_id, $group_id) |
wrapper for adding a user to a specified support group. | |
static | getAllSupportGroups () |
return all support_group objects. | |
Private Attributes | |
$sGroupId | |
The id of the support group. | |
$name | |
The name of the support group. | |
$tag | |
The tag of the support group, a tag is max 4 letters big, and will be used in the future as easy reference to indicate what group it is refered to (eg [DEV]) | |
$groupEmail | |
The email address of the group. | |
$iMAP_MailServer | |
The imap server connection string. | |
$iMAP_Username | |
The imap username of the account. | |
$iMAP_Password | |
The imap matching password. |
groups moderators & admins together.
A Support Group is a group of people with the same skills or knowledge. A typical example will be the (Developers group, webteam group, management, etc..) The idea is that tickets can be forwarded to a group of persons that might be able to answer that specific question. Support Groups are also the key of handling the emails, because the email addresses of the support groups will be used by the Mail_Handler class.
__construct | ( | ) |
A constructor.
Empty constructor
static addUserToSupportGroup | ( | $ | user_id, |
$ | group_id | ||
) | [static] |
wrapper for adding a user to a specified support group.
We will first check if the group really exists, if not than "GROUP_NOT_EXISING" will be returned. Afterwards we will check if the user exists in the support group, if so "ALREADY_ADDED" will be returned. Else the user will be added to the in_support_group table and "SUCCESS" will be returned.
$user_id | the id of the user we want to add to the group. |
$group_id | the id of the group the user wants to be in |
static constr_SGroupId | ( | $ | id | ) | [static] |
construct an object based on the SGroupId.
$id | the id of the group we want to construct |
create | ( | ) |
creates a new 'support_group' entry.
this method will use the object's attributes for creating a new 'support_group' entry in the database.
static createSupportGroup | ( | $ | name, |
$ | tag, | ||
$ | groupemail, | ||
$ | imap_mailserver, | ||
$ | imap_username, | ||
$ | imap_password | ||
) | [static] |
Wrapper for creating a support group.
It will check if the support group doesn't exist yet, if the tag or name already exists then NAME_TAKEN or TAG_TAKEN will be returned. If the name is bigger than 20 characters or smaller than 4 and the tag greater than 7 or smaller than 2 a SIZE_ERROR will be returned. Else it will return SUCCESS
delete | ( | ) |
deletes an existing 'support_group' entry.
this method will use the object's attributes for deleting an existing 'support_group' entry in the database.
static deleteSupportGroup | ( | $ | group_id | ) | [static] |
wrapper for deleting a support group.
We will first check if the group really exists, if not than "GROUP_NOT_EXISING" will be returned.
$group_id | the id of the group we want to delete |
static deleteUserOfSupportGroup | ( | $ | user_id, |
$ | group_id | ||
) | [static] |
wrapper for deleting a user that's in a specified support group.
We will first check if the group really exists, if not than "GROUP_NOT_EXISING" will be returned. Afterwards we will check if the user exists in the support group, if not "USER_NOT_IN_GROUP" will be returned. Else the users entry in the in_support_group table will be deleted and "SUCCESS" will be returned.
$user_id | the id of the user we want to remove out of the group. |
$group_id | the id of the group the user should be in |
static getAllSupportGroups | ( | ) | [static] |
return all support_group objects.
static getAllUsersOfSupportGroup | ( | $ | group_id | ) | [static] |
get list of all users that are enlisted to a support group.
$group_id | the id of the group we want to query |
static getGroup | ( | $ | id | ) | [static] |
return a specific support_group object.
$id | the id of the support group that we want to return |
getGroupEmail | ( | ) |
get groupEmail attribute of the object.
static getGroups | ( | ) | [static] |
return all support_group objects.
get iMAP_MailServer attribute of the object.
getIMAP_Password | ( | ) |
get iMAP_Password attribute of the object.
getIMAP_Username | ( | ) |
get iMAP_Username attribute of the object.
getName | ( | ) |
get name attribute of the object.
getSGroupId | ( | ) |
get sGroupId attribute of the object.
getTag | ( | ) |
get tag attribute of the object.
load_With_SGroupId | ( | $ | id | ) |
loads the object's attributes.
loads the object's attributes by giving a group id, it will put the matching groups attributes in the object.
$id | the id of the support group that should be loaded |
set | ( | $ | values | ) |
sets the object's attributes.
$values | should be an array of the form array('SGroupId' => groupid, 'Name' => name, 'Tag' => tag, 'GroupEmail' => mail, 'IMAP_MailServer' => server, 'IMAP_Username' => username,'IMAP_Password' => pass). |
setGroupEmail | ( | $ | ge | ) |
set groupEmail attribute of the object.
$ge | email of the group |
setIMAP_MailServer | ( | $ | ms | ) |
set iMAP_MailServer attribute of the object.
$ms | mailserver of the group |
setIMAP_Password | ( | $ | p | ) |
set iMAP_Password attribute of the object.
$p | imap password of the group |
setIMAP_Username | ( | $ | u | ) |
set iMAP_Username attribute of the object.
$u | imap username of the group |
setName | ( | $ | n | ) |
set name attribute of the object.
$n | name of the group |
setSGroupId | ( | $ | id | ) |
set sGroupId attribute of the object.
$id | integer id of the group |
setTag | ( | $ | t | ) |
set tag attribute of the object.
$t | tag of the group |
static supportGroup_EntryNotExists | ( | $ | name, |
$ | tag | ||
) | [static] |
check if support group name/tag doesn't exist yet.
$name | the name of the group we want to check |
$tag | the tag of the group we want to check |
static supportGroup_Exists | ( | $ | id | ) | [static] |
check if support group entry coupled to a given id exist or not.
$id | the id of the group we want to check |
update | ( | ) |
update the objects attributes to the db.
$groupEmail [private] |
The email address of the group.
$iMAP_MailServer [private] |
The imap server connection string.
$iMAP_Password [private] |
The imap matching password.
$iMAP_Username [private] |
The imap username of the account.
$name [private] |
The name of the support group.
$sGroupId [private] |
The id of the support group.
$tag [private] |
The tag of the support group, a tag is max 4 letters big, and will be used in the future as easy reference to indicate what group it is refered to (eg [DEV])