PHP Class Horde_Group_Sql, horde

Copyright 1999-2015 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.
Author: Duck ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: extends Horde_Group_Base
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_db Horde_Db_Adapter Handle for the current database connection.

Méthodes publiques

Méthode Description
__construct ( $params ) Constructor.
readOnly ( ) : boolean Returns whether the group backend is read-only.

Méthodes protégées

Méthode Description
_addUser ( mixed $gid, string $user ) Add a user to a group.
_create ( string $name, string $email = null ) : mixed Creates a new group.
_exists ( mixed $gid ) : boolean Checks if a group exists.
_getData ( mixed $gid ) : array Returns all available attributes of a group.
_getName ( mixed $gid ) : string Returns a group name.
_listAll ( ) : array Returns a list of all groups a user may see, with IDs as keys and names as values.
_listGroups ( string $user ) : array Returns a list of groups a user belongs to.
_listUsers ( mixed $gid ) : array Returns a list of users in a group.
_remove ( mixed $gid ) Removes a group.
_removeUser ( mixed $gid, string $user ) Removes a user from a group.
_rename ( mixed $gid, string $name ) Renames a group.
_search ( string $name ) : array Searches for group names.
_setData ( mixed $gid, array | string $attribute, string $value = null ) Sets one or more attributes of a group.

Method Details

__construct() public méthode

Constructor.
public __construct ( $params )

_addUser() protected méthode

Add a user to a group.
protected _addUser ( mixed $gid, string $user )
$gid mixed A group ID.
$user string A user name.

_create() protected méthode

Creates a new group.
protected _create ( string $name, string $email = null ) : mixed
$name string A group name.
$email string The group's email address.
Résultat mixed The ID of the created group.

_exists() protected méthode

Checks if a group exists.
protected _exists ( mixed $gid ) : boolean
$gid mixed A group ID.
Résultat boolean True if the group exists.

_getData() protected méthode

Returns all available attributes of a group.
protected _getData ( mixed $gid ) : array
$gid mixed A group ID.
Résultat array The group's date.

_getName() protected méthode

Returns a group name.
protected _getName ( mixed $gid ) : string
$gid mixed A group ID.
Résultat string The group's name.

_listAll() protected méthode

Returns a list of all groups a user may see, with IDs as keys and names as values.
protected _listAll ( ) : array
Résultat array All existing groups.

_listGroups() protected méthode

Returns a list of groups a user belongs to.
protected _listGroups ( string $user ) : array
$user string A user name.
Résultat array A list of groups, with IDs as keys and names as values.

_listUsers() protected méthode

Returns a list of users in a group.
protected _listUsers ( mixed $gid ) : array
$gid mixed A group ID.
Résultat array List of group users.

_remove() protected méthode

Removes a group.
protected _remove ( mixed $gid )
$gid mixed A group ID.

_removeUser() protected méthode

Removes a user from a group.
protected _removeUser ( mixed $gid, string $user )
$gid mixed A group ID.
$user string A user name.

_rename() protected méthode

Renames a group.
protected _rename ( mixed $gid, string $name )
$gid mixed A group ID.
$name string The new name.

_setData() protected méthode

Sets one or more attributes of a group.
protected _setData ( mixed $gid, array | string $attribute, string $value = null )
$gid mixed A group ID.
$attribute array | string An attribute name or a hash of attributes.
$value string An attribute value if $attribute is a string.

readOnly() public méthode

Returns whether the group backend is read-only.
public readOnly ( ) : boolean
Résultat boolean

Property Details

$_db protected_oe property

Handle for the current database connection.
protected Horde_Db_Adapter $_db
Résultat Horde_Db_Adapter