PHP 클래스 Acl\Controller\Component\AclComponent

상속: extends Cake\Controller\Component
파일 보기 프로젝트 열기: cakephp/acl 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$Aco string Aco object
$Aro string Aro object.

보호된 프로퍼티들

프로퍼티 타입 설명
$_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