Class PhpAco
Access Control Object
Package: Cake\Controller\Component\Acl
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Controller/Component/Acl/PhpAcl.php
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Controller/Component/Acl/PhpAcl.php
Properties summary
-
$_tree
protectedholds internal ACO representationarray
- map modifiers for ACO paths to their respective PCRE pattern
array
Method Summary
- __construct() publicConstructor
- access() publicallow/deny ARO access to ARO
- build() publicbuild a tree representation from the given allow/deny informations for ACO paths
- path() publicreturn path to the requested ACO with allow and deny rules attached on each level
- resolve() publicresolve given ACO string to a path
Method Detail
__construct()source public
__construct( array $rules array() )
Constructor
Parameters
- array
$rules
optional array() - Rules array
access()source public
access( string $aro , string $aco , string $action , string $type 'deny' )
allow/deny ARO access to ARO
Parameters
- string
$aro
- ARO string
- string
$aco
- ACO string
- string
$action
- Action string
- string
$type
optional 'deny' - access type
build()source public
build( array $allow , array $deny array() )
build a tree representation from the given allow/deny informations for ACO paths
Parameters
- array
$allow
- ACO allow rules
- array
$deny
optional array() - ACO deny rules
path()source public
path( string $aco )
return path to the requested ACO with allow and deny rules attached on each level
Parameters
- string
$aco
- ACO string
Returns
arrayresolve()source public
resolve( string $aco )
resolve given ACO string to a path
Parameters
- string
$aco
- ACO string
Returns
arraypath
Properties detail
$modifierssource
public static array
map modifiers for ACO paths to their respective PCRE pattern
array( '*' => '.*', )
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.10/class-PhpAco.html