PHP Класс Scalr\Acl\Resource\Definition

This class describes all known resources.
С версии: 30.07.2013
Автор: Vitaliy Demidov ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
get ( integer $resourceId ) : ResourceObject Gets the definition of the provided resource
getAll ( $raw = false ) : ArrayObject Gets all Resources
getByGroup ( string $group ) : ArrayObject Gets the list of the resources of specified associative group.
has ( integer $resourceId ) : boolean Checks if specified resource is defined

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

get() публичный статический Метод

Gets the definition of the provided resource
public static get ( integer $resourceId ) : ResourceObject
$resourceId integer The ID of the ACL resource
Результат ResourceObject Returns the object which describes specified resource or null if it does not exist.

getAll() публичный статический Метод

This method describes all available resources
public static getAll ( $raw = false ) : ArrayObject
Результат ArrayObject Returns array looks like [ resource_id => [name, description, resourceGroup, [[permission_id => description)][, ModeInterface]] ] Third value of array is optional and determines unique permissions for specified resource which can be allowed or forbidden separately. Forth value of the array is optional Resource Mode.

getByGroup() публичный статический Метод

Gets the list of the resources of specified associative group.
public static getByGroup ( string $group ) : ArrayObject
$group string The group identifier
Результат ArrayObject Returns the list of the resources of the specified associative group.

has() публичный статический Метод

Checks if specified resource is defined
public static has ( integer $resourceId ) : boolean
$resourceId integer The ID of the ACL resource
Результат boolean Returns true if defined or false otherwise