[commits] [Wiki] changed: HordeGroupAPI

Ben Klang ben at alkaloid.net
Sun Jan 30 17:29:45 UTC 2011


bklang  Sun, 30 Jan 2011 12:29:45 -0500

Modified page: http://wiki.horde.org/HordeGroupAPI
New Revision:  1.12
Change log:  Only Horde_Group API should be used by apps

@@ -31,8 +31,9 @@
  ----

  ++ Horde_Group_Backend
  This is the class that does the work of reading from/saving to the  
group storage backend.
+This class should not be used directly, instead Horde_Group objects  
are created and used.

  +++ create($name)

  Creates a new group and returns a new Horde_Group object.
@@ -41,14 +42,12 @@

  +++ renameGroup($gid, $newName)

  Changes the name of a group without affecting its membership list
-Should probably be private.  This method exists for the instantiated  
Horde_Group objects to perform backend operations.  Application code  
should work with Horde_Group objects.

  +++ removeGroup($gid)

  Removes a group from the groups system permanently.
-Should probably be private.  This method exists for the instantiated  
Horde_Group objects to perform backend operations.  Application code  
should work with Horde_Group objects.

  +++ getByName($name)

  Returns a Horde_Group object based on $name
@@ -77,31 +76,28 @@

  +++ getGroupMembership($user, $parentGroups = false)

  Returns an array of Horde_Group objects representing the user's membership
-
-+++ userIsInGroup($user, $gid, $subgroups = true)
-
-Say if a user is a member of a group or not.

  +++ addUser($gid, $username)

  Add a user to a group.

  * Should be able to handle arrays for both parameters.
-Should probably be private.  This method exists for the instantiated  
Horde_Group objects to perform backend operations.  Application code  
should work with Horde_Group objects.

-+++ removeUse($gid, $username)
++++ removeUser($gid, $username)

  Remove a user from a group.
-Should probably be private.  This method exists for the instantiated  
Horde_Group objects to perform backend operations.  Application code  
should work with Horde_Group objects.

  * Should be able to handle arrays for both parameters.


  ++ Horde_Group

  This object represents a group
+
++++ new($name, $create = true)
+Returns an instance of a Horde group.  If $create is true and the  
group does not exist, it is created.  If $create is false and the  
group does exist, or if $create is true and the group already exists,  
a Horde_Group_Exception is raised.

  +++ id()

  +++ addUser($username)



More information about the commits mailing list