Class Group_mock

Description

The Group:: class provides the Horde groups system.

$Horde: framework/Group/Group/mock.php,v 1.1.2.3 2009/01/06 15:23:08 jan Exp $

Copyright 2008-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Group/Group/mock.php (line 16)

Group
   |
   --Group_mock
Method Summary
 Group_mock Group_mock ()
 boolean exists (string $group)
 void &getGroup (string $name)
 void &getGroupById (integer $cid)
 integer getGroupId (string|DataTreeObject_Group $group)
 array getGroupMemberships (string $user, [boolean $parentGroups = false])
 string getGroupName (integer|DataTreeObject_Group $gid)
 integer getGroupParent (integer $gid)
 array getGroupParentList (integer $gid)
 array getGroupParents (integer $gid)
 The getGroupShortName (string $group)
 The getLevel (integer $gid)
 array listAllUsers ( $gid, integer $group)
 array listGroups ([boolean $refresh = false])
 array listUsers (integer $gid)
 DataTreeObject_Group &newGroup (string $name, [string $parent = GROUP_ROOT])
 void removeGroup (DataTreeObject_Group $group, [boolean $force = false])
 void shutdown ()
 boolean userIsInGroup (string $user, integer $gid, [boolean $subgroups = true])
 array __sleep ()
 void __wakeup ()
Variables
Methods
Constructor Group_mock (line 21)

Constructor.

Group_mock Group_mock ()
addGroup (line 74)

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.

void addGroup (DataTreeObject_Group $group)

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.
exists (line 146)

Check if a group exists in the system.

  • return: True if the group exists, false otherwise.
boolean exists (string $group)
  • string $group: The group to check.

Redefinition of:
Group::exists()
Check if a group exists in the system.
getGroup (line 51)

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.
getGroupById (line 62)

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.
getGroupId (line 134)

Retrieves the ID of a group.

  • return: The group's ID.
integer getGroupId (string|DataTreeObject_Group $group)

Redefinition of:
Group::getGroupId()
Retrieves the ID of a group.
getGroupMemberships (line 234)

Get a list of every group that $user is in.

  • return: An array of all groups the 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.
getGroupName (line 109)

Retrieves the name of a group.

  • return: The group's name.
string getGroupName (integer|DataTreeObject_Group $gid)
  • integer|DataTreeObject_Group $gid: The id of the group or the group object to retrieve the name for.

Redefinition of:
Group::getGroupName()
Retrieves the name of a group.
getGroupParent (line 170)

Returns the single parent ID of the given group.

  • return: The parent 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.
getGroupParentList (line 183)

Returns a flat list of the parents of a child group

  • return: A flat list of all of the parents of $group, hashed in $id => $name format.
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
getGroupParents (line 158)

Returns a tree of the parents of a child group.

  • return: The group parents tree, with groupnames as the keys.
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.
getGroupShortName (line 121)

Strips all parent references off of the given group name.

  • return: name of the group without parents.
The getGroupShortName (string $group)
  • string $group: Name of the group.

Redefinition of:
Group::getGroupShortName()
Strips all parent references off of the given group name.
getLevel (line 262)

Returns the nesting level of the given group. 0 is returned for any object directly below GROUP_ROOT.

  • return: nesting level of the group.
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.
listAllUsers (line 221)

Get a list of every user that is part of the specified group and any of its subgroups.

  • return: The complete user list.
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.
listGroups (line 196)

Returns a list of all groups, in the format id => groupname.

  • return: ID => groupname hash.
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.
listUsers (line 208)

Get a list of every user that is a part of this group ONLY.

  • return: The user list.
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.
newGroup (line 40)

Returns a new group object.

  • return: A new group object.
DataTreeObject_Group &newGroup (string $name, [string $parent = GROUP_ROOT])
  • string $name: The group's name.
  • string $parent: The group's parent's name.

Redefinition of:
Group::newGroup()
Returns a new group object.
removeGroup (line 95)

Removes a group from the groups system permanently.

void removeGroup (DataTreeObject_Group $group, [boolean $force = false])

Redefinition of:
Group::removeGroup()
Removes a group from the groups system permanently.
shutdown (line 270)

Stores the object in the session cache.

void shutdown ()

Redefinition of:
Group::shutdown()
Stores the object in the session cache.
updateGroup (line 84)

Stores updated data - users, etc. - of a group to the backend system.

void updateGroup (DataTreeObject_Group $group)

Redefinition of:
Group::updateGroup()
Stores updated data - users, etc. - of a group to the backend system.
userIsInGroup (line 249)

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.
__sleep (line 279)

Returns the properties that need to be serialized.

  • return: List of serializable properties.
array __sleep ()

Redefinition of:
Group::__sleep()
Returns the properties that need to be serialized.
__wakeup (line 28)

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()

Documentation generated on Sun, 30 Jan 2011 05:19:44 +0000 by phpDocumentor 1.4.3