This class provides an SQL driver for the Horde group system.
Copyright 1999-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public
|
|
public
boolean
|
#
readOnly( )
Returns whether the group backend is read-only.
Returns whether the group backend is read-only.
Returns
boolean
Overrides
|
public
mixed
|
#
create( string $name, string $email = null )
Creates a new group.
Parameters
- $name
- A group name.
- $email
- The group's email address.
Returns
mixed The ID of the created group.
Throws
Overrides
|
public
|
#
rename( mixed $gid, string $name )
Renames a group.
Parameters
- $gid
- A group ID.
- $name
- The new name.
Throws
Overrides
|
public
|
#
remove( mixed $gid )
Removes a group.
Parameters
Throws
Overrides
|
public
boolean
|
#
exists( mixed $gid )
Checks if a group exists.
Checks if a group exists.
Parameters
Returns
boolean True if the group exists.
Throws
|
public
string
|
#
getName( mixed $gid )
Returns a group name.
Parameters
Returns
string The group's name.
Throws
|
public
array
|
#
getData( mixed $gid )
Returns all available attributes of a group.
Returns all available attributes of a group.
Parameters
Returns
array The group's date.
Throws
|
public
|
#
setData( mixed $gid, array|string $attribute, string $value = null )
Sets one or more attributes of a group.
Sets one or more attributes of a group.
Parameters
- $gid
- A group ID.
- $attribute
- <p>An attribute name or a hash of
attributes.</p>
- $value
- <p>An attribute value if $attribute is a
string.</p>
Throws
Overrides
|
public
array
|
#
listAll( string $member = null )
Returns a list of all groups a user may see, with IDs as keys and names
as values.
Returns a list of all groups a user may see, with IDs as keys and names
as values.
Parameters
- $member
- Only return groups that this user is a member of.
Returns
array All existing groups.
Throws
|
public
array
|
#
listUsers( mixed $gid )
Returns a list of users in a group.
Returns a list of users in a group.
Parameters
Returns
array List of group users.
Throws
|
public
array
|
#
listGroups( string $user )
Returns a list of groups a user belongs to.
Returns a list of groups a user belongs to.
Parameters
Returns
array A list of groups, with IDs as keys and names as values.
Throws
|
public
|
#
addUser( mixed $gid, string $user )
Add a user to a group.
Parameters
- $gid
- A group ID.
- $user
- A user name.
Throws
Overrides
|
public
|
#
removeUser( mixed $gid, string $user )
Removes a user from a group.
Removes a user from a group.
Parameters
- $gid
- A group ID.
- $user
- A user name.
Throws
Overrides
|
public
array
|
#
search( string $name )
Searches for group names.
Searches for group names.
Parameters
Returns
array A list of matching groups, with IDs as keys and names as
values.
Throws
|