PHP Class ZfcRbac\Guard\ControllerPermissionsGuard

Author: Michaël Gallego ([email protected])
Author: JM Leroux ([email protected])
Inheritance: extends AbstractGuard, use trait ProtectionPolicyTrait
Afficher le fichier Open project: zf-commons/zfc-rbac Class Usage Examples

Protected Properties

Свойство Type Description
$authorizationService ZfcRbac\Service\AuthorizationServiceInterface
$rules array Controller guard rules

Méthodes publiques

Méthode Description
__construct ( ZfcRbac\Service\AuthorizationServiceInterface $authorizationService, array $rules = [] ) Constructor
isGranted ( MvcEvent $event ) {@inheritDoc}
setRules ( array $rules ) : void Set the rules

Method Details

__construct() public méthode

Constructor
public __construct ( ZfcRbac\Service\AuthorizationServiceInterface $authorizationService, array $rules = [] )
$authorizationService ZfcRbac\Service\AuthorizationServiceInterface
$rules array

isGranted() public méthode

{@inheritDoc}
public isGranted ( MvcEvent $event )
$event Zend\Mvc\MvcEvent

setRules() public méthode

A controller rule is made the following way: [ 'controller' => 'ControllerName', 'actions' => []/string 'roles' => []/string ]
public setRules ( array $rules ) : void
$rules array
Résultat void

Property Details

$authorizationService protected_oe property

protected AuthorizationServiceInterface,ZfcRbac\Service $authorizationService
Résultat ZfcRbac\Service\AuthorizationServiceInterface

$rules protected_oe property

Controller guard rules
protected array $rules
Résultat array