Overview

Packages

  • Group

Classes

  • Horde_Group_Base
  • Horde_Group_Contactlists
  • Horde_Group_Exception
  • Horde_Group_Kolab
  • Horde_Group_Ldap
  • Horde_Group_Mock
  • Horde_Group_Sql
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Group_Mock

This class provides a mock driver for the Horde group system.

Copyright 2008-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.

Horde_Group_Base
Extended by Horde_Group_Mock
Package: Group
Category: Horde
License: LGPL 2.1
Author: Duck duck@obala.net
Located at Horde/Group/Mock.php
Methods summary
public mixed
# create( string $name, string $email = null )

Creates a new group.

Creates a new group.

Parameters

$name
A group name.
$email
The group's email address.

Returns

mixed
The ID of the created group.

Throws

Horde_Group_Exception

Overrides

Horde_Group_Base::create()
public
# rename( mixed $gid, string $name )

Renames a group.

Renames a group.

Parameters

$gid
A group ID.
$name
The new name.

Throws

Horde_Group_Exception

Overrides

Horde_Group_Base::rename()
public
# remove( mixed $gid )

Removes a group.

Removes a group.

Parameters

$gid
A group ID.

Throws

Horde_Group_Exception

Overrides

Horde_Group_Base::remove()
public boolean
# exists( mixed $gid )

Checks if a group exists.

Checks if a group exists.

Parameters

$gid
A group ID.

Returns

boolean
True if the group exists.

Throws

Horde_Group_Exception
public string
# getName( mixed $gid )

Returns a group name.

Returns a group name.

Parameters

$gid
A group ID.

Returns

string
The group's name.

Throws

Horde_Group_Exception
public array
# getData( mixed $gid )

Returns all available attributes of a group.

Returns all available attributes of a group.

Parameters

$gid
A group ID.

Returns

array
The group's date.

Throws

Horde_Group_Exception
Horde_Exception_NotFound
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

Horde_Group_Exception
Horde_Exception_NotFound

Overrides

Horde_Group_Base::setData()
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

Horde_Group_Exception
public array
# listUsers( mixed $gid )

Returns a list of users in a group.

Returns a list of users in a group.

Parameters

$gid
A group ID.

Returns

array
List of group users.

Throws

Horde_Group_Exception
public array
# listGroups( string $user )

Returns a list of groups a user belongs to.

Returns a list of groups a user belongs to.

Parameters

$user
A user name.

Returns

array
A list of groups, with IDs as keys and names as values.

Throws

Horde_Group_Exception
public
# addUser( mixed $gid, string $user )

Add a user to a group.

Add a user to a group.

Parameters

$gid
A group ID.
$user
A user name.

Throws

Horde_Group_Exception

Overrides

Horde_Group_Base::addUser()
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

Horde_Group_Exception

Overrides

Horde_Group_Base::removeUser()
public array
# search( string $name )

Searches for group names.

Searches for group names.

Parameters

$name
A search string.

Returns

array

A list of matching groups, with IDs as keys and names as values.

Throws

Horde_Group_Exception
Methods inherited from Horde_Group_Base
readOnly(), renameSupported()
API documentation generated by ApiGen