PHP Class Acl\Adapter\Utility\PhpAco

Exibir arquivo Open project: cakephp/acl Class Usage Examples

Public Properties

Property Type Description
$modifiers array map modifiers for ACO paths to their respective PCRE pattern

Protected Properties

Property Type Description
$_tree array holds internal ACO representation

Public Methods

Method Description
__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

Method Details

__construct() public method

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

access() public method

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
return void

build() public method

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
return void

path() public method

return path to the requested ACO with allow and deny rules attached on each level
public path ( string $aco ) : array
$aco string ACO string
return array

resolve() public method

resolve given ACO string to a path
public resolve ( string $aco ) : array
$aco string ACO string
return array path

Property Details

$_tree protected_oe property

holds internal ACO representation
protected array $_tree
return array

$modifiers public_oe static_oe property

map modifiers for ACO paths to their respective PCRE pattern
public static array $modifiers
return array