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

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.

Detailed Description

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.

Author:
Daan Janssens, mentored by Matthew Lagoe

Constructor & Destructor Documentation

A constructor.

Empty constructor


Member Function Documentation

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.

Parameters:
$user_idthe id of the user we want to add to the group.
$group_idthe id of the group the user wants to be in
Returns:
a string (SUCCESS, ALREADY_ADDED or GROUP_NOT_EXISTING)
static constr_SGroupId ( id) [static]

construct an object based on the SGroupId.

Parameters:
$idthe id of the group we want to construct
Returns:
the constructed support group object
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

Returns:
a string that specifies if it was a success or not (SUCCESS, SIZE_ERROR, NAME_TAKEN or TAG_TAKEN )
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.

Parameters:
$group_idthe id of the group we want to delete
Returns:
an array of ticket_user objects that are in the support group.
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.

Parameters:
$user_idthe id of the user we want to remove out of the group.
$group_idthe id of the group the user should be in
Returns:
a string (SUCCESS, USER_NOT_IN_GROUP or GROUP_NOT_EXISTING)
static getAllSupportGroups ( ) [static]

return all support_group objects.

Returns:
an array containing all support_group objects.
Deprecated:
should be removed in the future, because getGroups does the same.
static getAllUsersOfSupportGroup ( group_id) [static]

get list of all users that are enlisted to a support group.

Parameters:
$group_idthe id of the group we want to query
Returns:
an array of ticket_user objects that are in the support group.
static getGroup ( id) [static]

return a specific support_group object.

Parameters:
$idthe id of the support group that we want to return
Returns:
a support_group object.

get groupEmail attribute of the object.

static getGroups ( ) [static]

return all support_group objects.

Returns:
an array containing all support_group objects.

get iMAP_MailServer attribute of the object.

get iMAP_Password attribute of the object.

get iMAP_Username attribute of the object.

getName ( )

get name attribute of the object.

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.

Parameters:
$idthe id of the support group that should be loaded
set ( values)

sets the object's attributes.

Parameters:
$valuesshould 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.

Parameters:
$geemail of the group
setIMAP_MailServer ( ms)

set iMAP_MailServer attribute of the object.

Parameters:
$msmailserver of the group
setIMAP_Password ( p)

set iMAP_Password attribute of the object.

Parameters:
$pimap password of the group
setIMAP_Username ( u)

set iMAP_Username attribute of the object.

Parameters:
$uimap username of the group
setName ( n)

set name attribute of the object.

Parameters:
$nname of the group
setSGroupId ( id)

set sGroupId attribute of the object.

Parameters:
$idinteger id of the group
setTag ( t)

set tag attribute of the object.

Parameters:
$ttag of the group
static supportGroup_EntryNotExists ( name,
tag 
) [static]

check if support group name/tag doesn't exist yet.

Parameters:
$namethe name of the group we want to check
$tagthe tag of the group we want to check
Returns:
if name is already taken return NAME_TAKEN, else if tag is already taken return TAG_TAKEN, else return success.
static supportGroup_Exists ( id) [static]

check if support group entry coupled to a given id exist or not.

Parameters:
$idthe id of the group we want to check
Returns:
true or false.
update ( )

update the objects attributes to the db.


Field Documentation

$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])


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