PHP Class ZfcRbac\Guard\RoutePermissionsGuard

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 Route guard rules Those rules are an associative array that map a rule with one or multiple permissions

Méthodes publiques

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

Method Details

__construct() public méthode

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

Set the rules (it overrides any existing rules)
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

Route guard rules Those rules are an associative array that map a rule with one or multiple permissions
protected array $rules
Résultat array