[cvs] [Wiki] changed: HordeGroupAPI

Ben Chavet ben at horde.org
Sun Dec 10 00:41:02 PST 2006


ben  Sun, 10 Dec 2006 00:41:02 -0800

Modified page: http://wiki.horde.org/HordeGroupAPI
New Revision:  1.4
Change log:  fill in some method descriptions

@@ -26,121 +26,143 @@
  * **$parent** -- ID of Group's Parent
  
  ----
  
-++ API
+++ Group:: (Horde_Groups:: for Horde4)
  
-+++ Group
++++ addGroup(@@--- $group +++ $name, $parent@@)
  
-++++ addGroup($group|$name, $parent)
+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. @@
  
-Add handlers for $name and $parent parameters from newGroup()
+* Add handlers for $name and $parent parameters from newGroup()
  
-++++ renameGroup($group|$gid, $newName)
++++ renameGroup(@@--- $group +++ $gid@@, $newName)
  
-++++ removeGroup($group|$gid, $force = false)
+Changes the name of a group without changing its contents or where it                                                 
+is in the groups hierarchy.  
  
-++++ getGroupName($gid)
++++ removeGroup(@@--- $group +++ $gid@@, $force = false)
  
-++++ getGUID($group|$gid)
+Removes a group from the groups system permanently.
  
-++++ exists($group|$gid)
++++ getGroupName($gid)
  
-++++ getGroupParent($gid)
+Retrieves the name of a group.
  
-Add support to take over getGroupParentList()
++++ getGUID(@@--- $group +++ $gid@@)
  
-++++ listGroups($refresh = false)
+Returns a globally unique ID for a group.
  
-++++ listUsers($gid)
++++ exists(@@--- $group +++ $gid@@)
  
-Add support to take over listAllUsers()
+Check if a group exists in the system.
  
-++++ getGroupMembership($user, $parentGroups = false)
++++ getGroupParent($gid@@+++, $deep = false@@)
  
-++++ userIsInGroup($user, $gid, $subgroups = true)
+Returns the single parent ID @@+++ or a list of parent IDs@@ of the given group.
  
-++++ @@+++ addUser($username, $gid) @@
+* Add support to take over getGroupParentList()
  
-new function -- no longer using group objects.
++++ listGroups($refresh = false)
  
-Should be able to handle arrays for both parameters.
+Returns a list of all groups, in the format gid => name.
  
-++++ @@+++ removeUser($username, $gid) @@
++++ listUsers($gid@@+++, @all = false@@)
  
-new function -- no longer using group objects.
+Get a list of every user that is a part of this group ONLY.
  
-Should be able to handle arrays for both parameters.
+* Add support to take over listAllUsers()
  
-++++ updateGroup($group)
++++ getGroupMembership($user, $parentGroups = false)
+
+Get a list of every group that $user is in.
+
++++ userIsInGroup($user, $gid, $subgroups = true)
+
+Say if a user is a member of a group or not.
+
++++ @@+++ addUser($username, $gid) @@
+
+Add a user to a group.
+
+* Should be able to handle arrays for both parameters.
+
++++ @@+++ removeUser($username, $gid) @@
+
+Remove a user from a group.
+
+* Should be able to handle arrays for both parameters.
+
++++ updateGroup($group)
  
  ##yellow|deprecated?## -- should we always update the backend?
  
-++++ getLevel($gid)
++++ getLevel($gid)
  
  ##yellow|deprecated## -- is this used?
  
-++++ getAuditLog($gid)
++++ getAuditLog($gid)
  
  ##yellow|new function## -- do we need this?
  
-++++ clearAuditLog($gid)
++++ clearAuditLog($gid)
  
  ##yellow|new function## -- do we need this?
  
  
-++++ @@--- newGroup($name, $parent = DATATREE_ROOT) @@
++++ @@--- newGroup($name, $parent = DATATREE_ROOT) @@
  
  deprecated in favor of using addGroup()
  
-++++ @@--- getGroup($gid) @@
++++ @@--- getGroup($gid) @@
  
  deprecated -- no longer using group objects.
  
-++++ @@--- getGroupById($gid) @@
++++ @@--- getGroupById($gid) @@
  
  deprecated -- no longer using group objects.
  
-++++ @@--- getGroupShortName($group) @@
++++ @@--- getGroupShortName($group) @@
  
  deprecated -- no need for short names...they're just confusing (K.I.S.S)
  
-++++ @@--- getGroupId($group) @@
++++ @@--- getGroupId($group) @@
  
  deprecated -- no longer using group objects.
  
-++++ @@--- getGroupParents($gid) @@
++++ @@--- getGroupParents($gid) @@
  
  deprecated in favor of always using flat lists.
  
-++++ @@--- getGroupParentList($gid) @@
++++ @@--- getGroupParentList($gid) @@
  
  deprecated in favor of getGroupParent()
  
-++++ @@--- listAllUsers($gid) @@
++++ @@--- listAllUsers($gid) @@
  
  deprecated in favor of listUsers()
  
  
-+++ @@--- !DatatreeObject_Group @@
+++ @@--- !DatatreeObject_Group @@
  
  All !DatatreeObject_Group functionality has been moved to Group (Horde_Groups) to eliminate OO overhead.
  
-++++ setGroupOb(&$groupOb)
-
-++++ getId()
++++ setGroupOb(&$groupOb)
  
-++++ save()
++++ getId()
  
-++++ addUser($username, $update = true)
++++ save()
  
-++++ removeUser($username, $update = true)
++++ addUser($username, $update = true)
  
-++++ listUser()
++++ removeUser($username, $update = true)
  
-++++ listAllUsers()
++++ listUser()
  
-++++ getAuditLog()
++++ listAllUsers()
  
-++++ clearAuditLog()
++++ getAuditLog()
  
++++ clearAuditLog()
  


More information about the cvs mailing list