Combu Server  3.1.1
PHP API Documentation
Public Member Functions | Static Public Member Functions | Data Fields
UserGroup Class Reference
Inheritance diagram for UserGroup:
DataClass

Public Member Functions

 __construct ($src=null, $stripSlashes=false)
 
 Exists ()
 
 Save ()
 
 Delete ()
 
 GetMembers ()
 
 GetMembersAccount ()
 
 ToArray ()
 
- Public Member Functions inherited from DataClass
 Save ()
 
 Delete ()
 
 ToJson ()
 
 ToArray ()
 

Static Public Member Functions

static Load ($name=NULL, $idOwner=0, $idAccount=0, $limit=null, $offset=null, &$count=null, $returnArray=false)
 
- Static Public Member Functions inherited from DataClass
static GetTableName ($class)
 
static LoadRecords ($query, $returnedClass="")
 
static CountRecords ($tableName, $filter=null)
 
static TruncateTable ($tableName)
 
static TruncateClass ($class)
 

Data Fields

const TABLE_NAME = "UserGroup"
 
 $Id = 0
 
 $Name = ""
 
 $IdOwner = 0
 
 $Public = 0
 
 $CustomData = ""
 

Additional Inherited Members

- Protected Member Functions inherited from DataClass
 _loadFilter ($tableName, $filter)
 
 _loadByRow ($row, $stripSlashes=false, $callbackOnExists=false)
 
 _Delete ($tableName, $filter=null)
 
- Static Protected Member Functions inherited from DataClass
static _count ($tableName, $filter=null)
 
static _load ($tableName, $returnedClass="", $where="", $order=null, $limit=null, $offset=null, &$count=null)
 
static _loadEx ($select, $from, $returnedClass="", $where="", $order=null, $limit=null, $offset=null, &$count=null, $debug=false)
 
static _loadQuery ($query, $returnedClass="")
 

Detailed Description

Class to handle User Groups

Author
Skared Creations

Definition at line 10 of file UserGroup.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $src = null,
  $stripSlashes = false 
)

Contructor

Definition at line 23 of file UserGroup.php.

Member Function Documentation

◆ Delete()

Delete ( )

Delete the record from the database

Returns
bool Returns TRUE on success

Definition at line 117 of file UserGroup.php.

◆ Exists()

Exists ( )

Check if the current Name already exists

Returns
boolean Returns TRUE if exists

Definition at line 41 of file UserGroup.php.

◆ GetMembers()

GetMembers ( )

Get the members of this group

Returns
UserGroupAccount[] List of UserGroupAccount

Definition at line 134 of file UserGroup.php.

◆ GetMembersAccount()

GetMembersAccount ( )

Get the members account of this group

Returns
Account[] List of Account

Definition at line 146 of file UserGroup.php.

◆ Load()

static Load (   $name = NULL,
  $idOwner = 0,
  $idAccount = 0,
  $limit = null,
  $offset = null,
$count = null,
  $returnArray = false 
)
static

Get the registered groups

Parameters
int$idAccountFilter membership of an account
int$limitMax number of results (for paged results)
int$offsetOffset number of results (for paged results)
int$countWill be set to the total count of results
boolean$returnArrayIf TRUE then it will return associative arrays else objects Database $Database
Returns
[] Returns the array of records

Definition at line 63 of file UserGroup.php.

◆ Save()

Save ( )

Save the record in the database

Returns
bool Returns TRUE on success

Definition at line 87 of file UserGroup.php.

◆ ToArray()

ToArray ( )

Get the array representation of this object

Returns
array

Definition at line 161 of file UserGroup.php.

Field Documentation

◆ $CustomData

$CustomData = ""

Definition at line 18 of file UserGroup.php.

◆ $Id

$Id = 0

Definition at line 14 of file UserGroup.php.

◆ $IdOwner

$IdOwner = 0

Definition at line 16 of file UserGroup.php.

◆ $Name

$Name = ""

Definition at line 15 of file UserGroup.php.

◆ $Public

$Public = 0

Definition at line 17 of file UserGroup.php.

◆ TABLE_NAME

const TABLE_NAME = "UserGroup"

Definition at line 12 of file UserGroup.php.