PHP Класс Acl\Adapter\Utility\PhpAco

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$modifiers array map modifiers for ACO paths to their respective PCRE pattern

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

Свойство Тип Описание
$_tree array holds internal ACO representation

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

Метод Описание
__construct ( array $rules = [] ) Constructor
access ( string $aro, string $aco, string $action, string $type = 'deny' ) : void allow/deny ARO access to ARO
build ( array $allow, array $deny = [] ) : void build a tree representation from the given allow/deny informations for ACO paths
path ( string $aco ) : array return path to the requested ACO with allow and deny rules attached on each level
resolve ( string $aco ) : array resolve given ACO string to a path

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

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

Constructor
public __construct ( array $rules = [] )
$rules array Rules array

access() публичный метод

allow/deny ARO access to ARO
public access ( string $aro, string $aco, string $action, string $type = 'deny' ) : void
$aro string ARO string
$aco string ACO string
$action string Action string
$type string access type
Результат void

build() публичный метод

build a tree representation from the given allow/deny informations for ACO paths
public build ( array $allow, array $deny = [] ) : void
$allow array ACO allow rules
$deny array ACO deny rules
Результат void

path() публичный метод

return path to the requested ACO with allow and deny rules attached on each level
public path ( string $aco ) : array
$aco string ACO string
Результат array

resolve() публичный метод

resolve given ACO string to a path
public resolve ( string $aco ) : array
$aco string ACO string
Результат array path

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

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

holds internal ACO representation
protected array $_tree
Результат array

$modifiers публичное статическое свойство

map modifiers for ACO paths to their respective PCRE pattern
public static array $modifiers
Результат array