Constructor.
Group_mock
Group_mock
()
Adds a group to the groups system. The group must first be created with Group::newGroup(), and have any initial users added to it, before this function is called.
Redefinition of:
- Group::addGroup()
- Adds a group to the groups system. The group must first be created with Group::newGroup(), and have any initial users added to it, before this function is called.
Check if a group exists in the system.
boolean
exists
(string $group)
-
string
$group: The group to check.
Redefinition of:
- Group::exists()
- Check if a group exists in the system.
Returns a DataTreeObject_Group object corresponding to the named group, with the users and other data retrieved appropriately.
void
&getGroup
(string $name)
-
string
$name: The name of the group to retrieve.
Redefinition of:
- Group::getGroup()
- Returns a DataTreeObject_Group object corresponding to the named group, with the users and other data retrieved appropriately.
Returns a DataTreeObject_Group object corresponding to the given unique ID, with the users and other data retrieved appropriately.
void
&getGroupById
(integer $cid)
-
integer
$cid: The unique ID of the group to retrieve.
Redefinition of:
- Group::getGroupById()
- Returns a DataTreeObject_Group object corresponding to the given unique ID, with the users and other data retrieved appropriately.
Get a list of every group that $user is in.
array
getGroupMemberships
(string $user, [boolean $parentGroups = false])
-
string
$user: The user to get groups for.
-
boolean
$parentGroups: Also return the parents of any groups?
Redefinition of:
- Group::getGroupMemberships()
- Get a list of every group that $user is in.
Returns the single parent ID of the given group.
integer
getGroupParent
(integer $gid)
-
integer
$gid: The DataTree ID of the child group.
Redefinition of:
- Group::getGroupParent()
- Returns the single parent ID of the given group.
Returns a flat list of the parents of a child group
array
getGroupParentList
(integer $gid)
-
integer
$gid: The id of the group.
Redefinition of:
- Group::getGroupParentList()
- Returns a flat list of the parents of a child group
Returns a tree of the parents of a child group.
array
getGroupParents
(integer $gid)
-
integer
$gid: The id of the child group.
Redefinition of:
- Group::getGroupParents()
- Returns a tree of the parents of a child group.
Strips all parent references off of the given group name.
The
getGroupShortName
(string $group)
-
string
$group: Name of the group.
Redefinition of:
- Group::getGroupShortName()
- Strips all parent references off of the given group name.
Returns the nesting level of the given group. 0 is returned for any object directly below GROUP_ROOT.
The
getLevel
(integer $gid)
-
integer
$gid: The ID of the group.
Redefinition of:
- Group::getLevel()
- Returns the nesting level of the given group. 0 is returned for any object directly below GROUP_ROOT.
Get a list of every user that is part of the specified group and any of its subgroups.
array
listAllUsers
( $gid, integer $group)
-
integer
$group: The ID of the parent group.
-
$gid
Redefinition of:
- Group::listAllUsers()
- Get a list of every user that is part of the specified group and any of its subgroups.
Returns a list of all groups, in the format id => groupname.
array
listGroups
([boolean $refresh = false])
-
boolean
$refresh: If true, the cached value is ignored and the group list is refreshed from the group backend.
Redefinition of:
- Group::listGroups()
- Returns a list of all groups, in the format id => groupname.
Get a list of every user that is a part of this group ONLY.
array
listUsers
(integer $gid)
-
integer
$gid: The ID of the group.
Redefinition of:
- Group::listUsers()
- Get a list of every user that is a part of this group ONLY.
Returns a new group object.
-
string
$name: The group's name.
-
string
$parent: The group's parent's name.
Redefinition of:
- Group::newGroup()
- Returns a new group object.
Removes a group from the groups system permanently.
Redefinition of:
- Group::removeGroup()
- Removes a group from the groups system permanently.
Stores the object in the session cache.
void
shutdown
()
Redefinition of:
- Group::shutdown()
- Stores the object in the session cache.
Stores updated data - users, etc. - of a group to the backend system.
Redefinition of:
- Group::updateGroup()
- Stores updated data - users, etc. - of a group to the backend system.
Say if a user is a member of a group or not.
boolean
userIsInGroup
(string $user, integer $gid, [boolean $subgroups = true])
-
string
$user: The name of the user.
-
integer
$gid: The ID of the group.
-
boolean
$subgroups: Return true if the user is in any subgroups of group with ID $gid, also.
Redefinition of:
- Group::userIsInGroup()
- Say if a user is a member of a group or not.
Returns the properties that need to be serialized.
array
__sleep
()
Redefinition of:
- Group::__sleep()
- Returns the properties that need to be serialized.
Initializes the object.
void
__wakeup
()
Redefinition of:
- Group::__wakeup()
- Initializes the object.
Inherited Methods
Inherited From Group
Group::Group()
Group::addGroup()
Group::exists()
Group::factory()
Group::getGroup()
Group::getGroupById()
Group::getGroupId()
Group::getGroupMemberships()
Group::getGroupName()
Group::getGroupParent()
Group::getGroupParentList()
Group::getGroupParents()
Group::getGroupShortName()
Group::getGUID()
Group::getLevel()
Group::listAllUsers()
Group::listGroups()
Group::listUsers()
Group::newGroup()
Group::removeGroup()
Group::shutdown()
Group::singleton()
Group::updateGroup()
Group::userIsInGroup()
Group::_loadDriver()
Group::__sleep()
Group::__wakeup()