PHP Класс Acl\Controller\Component\AclComponent

Наследование: extends Cake\Controller\Component
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$Aco string Aco object
$Aro string Aro object.

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

Свойство Тип Описание
$_Instance Acl\AclInterface Instance of an ACL class

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

Метод Описание
__construct ( Cake\Controller\ComponentRegistry $collection, array $config = [] ) Constructor. Will return an instance of the correct ACL class as defined in Configure::read('Acl.classname')
adapter ( Acl\AclInterface | string $adapter = null ) : Acl\AclInterface | void Sets or gets the Adapter object currently in the AclComponent.
allow ( array | string | Model $aro, array | string | Model $aco, string $action = "*" ) : boolean Pass-thru function for ACL allow instance. Allow methods are used to grant an ARO access to an ACO.
check ( array | string | Model $aro, array | string | Model $aco, string $action = "*" ) : boolean Pass-thru function for ACL check instance. Check methods are used to check whether or not an ARO can access an ACO
deny ( array | string | Model $aro, array | string | Model $aco, string $action = "*" ) : boolean Pass-thru function for ACL deny instance. Deny methods are used to remove permission from an ARO to access an ACO.
inherit ( array | string | Model $aro, array | string | Model $aco, string $action = "*" ) : boolean Pass-thru function for ACL inherit instance. Inherit methods modify the permission for an ARO to be that of its parent object.

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

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

Constructor. Will return an instance of the correct ACL class as defined in Configure::read('Acl.classname')
public __construct ( Cake\Controller\ComponentRegistry $collection, array $config = [] )
$collection Cake\Controller\ComponentRegistry A ComponentRegistry
$config array Array of configuration settings

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

$this->Acl->adapter(); will get the current adapter class while $this->Acl->adapter($obj); will set the adapter class Will call the initialize method on the adapter if setting a new one.
public adapter ( Acl\AclInterface | string $adapter = null ) : Acl\AclInterface | void
$adapter Acl\AclInterface | string Instance of AclInterface or a string name of the class to use. (optional)
Результат Acl\AclInterface | void either null, or the adapter implementation.

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

Pass-thru function for ACL allow instance. Allow methods are used to grant an ARO access to an ACO.
public allow ( array | string | Model $aro, array | string | Model $aco, string $action = "*" ) : boolean
$aro array | string | Model ARO The requesting object identifier. See `AclNode::node()` for possible formats
$aco array | string | Model ACO The controlled object identifier. See `AclNode::node()` for possible formats
$action string Action (defaults to *)
Результат boolean Success

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

Pass-thru function for ACL check instance. Check methods are used to check whether or not an ARO can access an ACO
public check ( array | string | Model $aro, array | string | Model $aco, string $action = "*" ) : boolean
$aro array | string | Model ARO The requesting object identifier. See `AclNode::node()` for possible formats
$aco array | string | Model ACO The controlled object identifier. See `AclNode::node()` for possible formats
$action string Action (defaults to *)
Результат boolean Success

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

Pass-thru function for ACL deny instance. Deny methods are used to remove permission from an ARO to access an ACO.
public deny ( array | string | Model $aro, array | string | Model $aco, string $action = "*" ) : boolean
$aro array | string | Model ARO The requesting object identifier. See `AclNode::node()` for possible formats
$aco array | string | Model ACO The controlled object identifier. See `AclNode::node()` for possible formats
$action string Action (defaults to *)
Результат boolean Success

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

Pass-thru function for ACL inherit instance. Inherit methods modify the permission for an ARO to be that of its parent object.
public inherit ( array | string | Model $aro, array | string | Model $aco, string $action = "*" ) : boolean
$aro array | string | Model ARO The requesting object identifier. See `AclNode::node()` for possible formats
$aco array | string | Model ACO The controlled object identifier. See `AclNode::node()` for possible formats
$action string Action (defaults to *)
Результат boolean Success

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

$Aco публичное свойство

Aco object
public string $Aco
Результат string

$Aro публичное свойство

Aro object.
public string $Aro
Результат string

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

Instance of an ACL class
protected AclInterface,Acl $_Instance
Результат Acl\AclInterface