PHP Class Resource_Acl

Inheritance: extends Zend_Application_Resource_ResourceAbstract
Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Méthodes publiques

Méthode Description
getAccess ( string $controller, string $action ) : array Get access
getAcl ( Zend_Acl_Role_Interface $role ) : Zend_Acl Get acl for role
getActions ( string $resource = '' ) : array Get resource actions
getResources ( ) : array Get application resources
init ( ) Init acl
isAllowed ( Zend_Acl_Role_Interface $role, string $resource, string $action ) : boolean Check access
setStorage ( Resource\Acl\StorageInterface $storage ) : Resource_Acl Set acl storage

Private Methods

Méthode Description
addRules ( Zend_Acl $acl, Zend_Acl_Role_Interface $role ) : void Add role rules
formatName ( string $name, string $module = '' ) : string Format name for resource/action
getAnnotationReader ( ) : AnnotationReader Get annotation reader
getStorage ( ) : Resource\Acl\StorageInterface Get acl storage
scan ( ) : void Scan for resources/actions

Method Details

getAccess() public méthode

Get access
public getAccess ( string $controller, string $action ) : array
$controller string
$action string
Résultat array (resource, action)

getAcl() public méthode

Get acl for role
public getAcl ( Zend_Acl_Role_Interface $role ) : Zend_Acl
$role Zend_Acl_Role_Interface
Résultat Zend_Acl

getActions() public méthode

Get resource actions
public getActions ( string $resource = '' ) : array
$resource string
Résultat array

getResources() public méthode

Get application resources
public getResources ( ) : array
Résultat array

init() public méthode

Init acl
public init ( )

isAllowed() public méthode

Check access
public isAllowed ( Zend_Acl_Role_Interface $role, string $resource, string $action ) : boolean
$role Zend_Acl_Role_Interface
$resource string
$action string
Résultat boolean

setStorage() public méthode

Set acl storage
public setStorage ( Resource\Acl\StorageInterface $storage ) : Resource_Acl
$storage Resource\Acl\StorageInterface
Résultat Resource_Acl