PHP Класс Horde_Core_Perms, horde

Copyright 2001-2016 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.
Автор: Chuck Hagenbuch ([email protected])
Автор: Jan Schneider ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_appPerms array Caches information about application permissions.
$_perms Horde_Perms_Base A permissions instance.
$_registry Horde_Registry A registry instance.

Открытые методы

Метод Описание
__construct ( Horde_Registry $registry, Horde_Perms_Base $perms ) Constructor.
getApplicationPermissions ( string $app ) : array Returns information about permissions implemented by an application.
getAvailable ( string $name ) : array Returns the available permissions for a given level.
getParams ( string $name ) : array Given a permission name, returns the parameters for that permission.
getTitle ( string $name ) : string Given a permission name, returns the title for that permission by looking it up in the applications's permission api.
getType ( string $name ) : string Given a permission name, returns the type for that permission.
hasAppPermission ( string $permission, array $opts = [] ) : mixed Finds out if the user has the specified rights to the given object, specific to a certain application.
newPermission ( string $name ) : Horde_Perms_Permission Returns a new permissions object.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Horde_Registry $registry, Horde_Perms_Base $perms )
$registry Horde_Registry
$perms Horde_Perms_Base

getApplicationPermissions() публичный Метод

Returns information about permissions implemented by an application.
public getApplicationPermissions ( string $app ) : array
$app string An application name.
Результат array Hash with permissions information.

getAvailable() публичный Метод

Returns the available permissions for a given level.
public getAvailable ( string $name ) : array
$name string The permission's name.
Результат array An array of available permissions and their titles or false if not sub permissions exist for this level.

getParams() публичный Метод

Given a permission name, returns the parameters for that permission.
public getParams ( string $name ) : array
$name string The permissions's name.
Результат array The paramters for the permission.

getTitle() публичный Метод

Given a permission name, returns the title for that permission by looking it up in the applications's permission api.
public getTitle ( string $name ) : string
$name string The permissions's name.
Результат string The title for the permission.

getType() публичный Метод

Given a permission name, returns the type for that permission.
public getType ( string $name ) : string
$name string The permissions's name.
Результат string The type for the permission.

hasAppPermission() публичный Метод

Finds out if the user has the specified rights to the given object, specific to a certain application.
public hasAppPermission ( string $permission, array $opts = [] ) : mixed
$permission string The permission to check.
$opts array Additional options:
'app' - (string) The app to check.
        DEFAULT: The current pushed app.
'opts' - (array) Additional options to pass to the app function.
         DEFAULT: None
Результат mixed The specified permissions.

newPermission() публичный Метод

This must be used instead of Horde_Perms_Base::newPermission() because it works with application-specific permissions.
public newPermission ( string $name ) : Horde_Perms_Permission
$name string The permission's name.
Результат Horde_Perms_Permission A new permissions object.

Описание свойств

$_appPerms защищенное свойство

Caches information about application permissions.
protected array $_appPerms
Результат array

$_perms защищенное свойство

A permissions instance.
protected Horde_Perms_Base $_perms
Результат Horde_Perms_Base

$_registry защищенное свойство

A registry instance.
protected Horde_Registry $_registry
Результат Horde_Registry