PHP Class ZfcRbac\Guard\RoutePermissionsGuard

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

Protected Properties

Property 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

Public Methods

Method 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 method

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

isGranted() public method

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

setRules() public method

Set the rules (it overrides any existing rules)
public setRules ( array $rules ) : void
$rules array
return void

Property Details

$authorizationService protected_oe property

protected AuthorizationServiceInterface,ZfcRbac\Service $authorizationService
return 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
return array