Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Group Class Reference
+ Inheritance diagram for Group:
+ Collaboration diagram for Group:

Public Member Functions

 GetGroups ()
 
 SuppressUser ($uid, $nopost=false)
 
 PostSelect ($id)
 
 preInsert ()
 
 PostDelete ($uid=0)
 
 PostInsert ()
 
 setSyncAccount ($syncAccount)
 
 resetAccountMemberOf ($synchro=false)
 
 GetAllGroups ()
 
 getChildsGroupId ($pgid)
 
 getParentsGroupId ($pgid, $level=0)
 
 getDirectParentsGroupId ($pgid="", &$uasid)
 
- Public Member Functions inherited from DbObj
 __construct ($dbaccess= '', $id= '', $res= '', $dbid=0)
 
 Select ($id)
 
 getValues ()
 
 affectColumn ($fields, $reset=true)
 
 affect ($array, $more=false, $reset=true)
 
 isAffected ()
 
 Complete ()
 
 preInsert ()
 
 postInsert ()
 
 preUpdate ()
 
 postUpdate ()
 
 preDelete ()
 
 postDelete ()
 
 preSelect ($id)
 
 postSelect ($id)
 
 Add ($nopost=false, $nopre=false)
 
 modify ($nopost=false, $sfields="", $nopre=false)
 
 delete ($nopost=false)
 
 Adds (&$tcopy, $nopost=false)
 
 lw ($prop)
 
 CloseConnect ()
 
 Create ($nopost=false)
 
 postInit ()
 
 init_dbid ()
 
 exec_query ($sql, $lvl=0, $prepare=false)
 
 numrows ()
 
 fetch_array ($c, $type=PGSQL_ASSOC)
 
 update ()
 
 setError ($moreerr= '')
 
 autoUpdate ()
 
 savePoint ($point)
 
 lockPoint ($exclusiveLock, $exclusiveLockPrefix= '')
 
 setMasterLock ($useLock)
 
 rollbackPoint ($point)
 
 commitPoint ($point)
 

Data Fields

 $fields
 
 $id_fields
 
 $dbtable = "groups"
 
 $sqlcreate
 
 $groups = array()
 
 $iduser
 
 $idgroup
 
- Data Fields inherited from DbObj
 $dbid = - 1
 
 $dbaccess = ''
 
 $fields
 
 $dbtable = ''
 
 $id_fields
 
 $criterias = array()
 
 $sup_fields = array()
 
 $sup_where = array()
 
 $sup_tables = array()
 
 $fulltextfields = array()
 
 $order_by = ""
 
 $isset = false
 
 $msg_err = ''
 
 $err_code = ''
 
 $res = ''
 
 $debug = false
 
 $sqlcreate
 
 $sqlinit
 
 $log
 

Protected Attributes

 $syncAccount = true
 

Additional Inherited Members

- Static Public Attributes inherited from DbObj
static $savepoint = array()
 
static $lockpoint = array()
 
static $sqlStrict = null
 
- Protected Member Functions inherited from DbObj
 tryCreate ()
 

Detailed Description

Definition at line 22 of file Class.Group.php.

Member Function Documentation

GetAllGroups ( )

get ascendant direct group and group of group

Definition at line 197 of file Class.Group.php.

getChildsGroupId (   $pgid)

get all child (descendant) group of this group

Returns
array id

Definition at line 212 of file Class.Group.php.

getDirectParentsGroupId (   $pgid = "",
$uasid 
)

get all parent (ascendant) group of this group

Returns
array id

Definition at line 258 of file Class.Group.php.

+ Here is the call graph for this function:

GetGroups ( )

get groups of a user set groups attribute. This attribute containt id of group of a user

Returns
bool true if at least one group

Definition at line 55 of file Class.Group.php.

+ Here is the call graph for this function:

getParentsGroupId (   $pgid,
  $level = 0 
)

get all parent (ascendant) group of this group

Returns
array id

Definition at line 234 of file Class.Group.php.

PostDelete (   $uid = 0)

Definition at line 108 of file Class.Group.php.

+ Here is the call graph for this function:

PostInsert ( )

Definition at line 132 of file Class.Group.php.

+ Here is the call graph for this function:

PostSelect (   $id)

initialise groups for a user

Definition at line 92 of file Class.Group.php.

+ Here is the call graph for this function:

preInsert ( )

Definition at line 97 of file Class.Group.php.

+ Here is the call graph for this function:

resetAccountMemberOf (   $synchro = false)

recompute all memberof properties of user accounts

Definition at line 171 of file Class.Group.php.

+ Here is the call graph for this function:

setSyncAccount (   $syncAccount)
Parameters
boolean$syncAccount

Definition at line 164 of file Class.Group.php.

SuppressUser (   $uid,
  $nopost = false 
)

suppress a user from the group

Parameters
int$uiduser identifier to suppress
bool$nopostset to to true to not perform postDelete methods
Returns
string error message

Definition at line 73 of file Class.Group.php.

+ Here is the call graph for this function:

Field Documentation

$dbtable = "groups"

Definition at line 33 of file Class.Group.php.

$fields
Initial value:
= array(
"iduser",
"idgroup"
)

Definition at line 24 of file Class.Group.php.

$groups = array()

Definition at line 42 of file Class.Group.php.

$id_fields
Initial value:
= array(
"iduser"
)

Definition at line 29 of file Class.Group.php.

$idgroup

Definition at line 44 of file Class.Group.php.

$iduser

Definition at line 43 of file Class.Group.php.

$sqlcreate
Initial value:
= "
create table groups ( iduser int not null,
idgroup int not null);
create index groups_idx1 on groups(iduser);
create unique index groups_idx2 on groups(iduser,idgroup);
create trigger t_nogrouploop before insert or update on groups for each row execute procedure nogrouploop();"

Definition at line 35 of file Class.Group.php.

$syncAccount = true
protected

Definition at line 46 of file Class.Group.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen