PHP Class ZfcRbac\Guard\RouteGuard

Author: Michaël Gallego ([email protected])
Inheritance: extends AbstractGuard, use trait ProtectionPolicyTrait
显示文件 Open project: zf-commons/zfc-rbac Class Usage Examples

Protected Properties

Property Type Description
$roleService ZfcRbac\Service\RoleService
$rules array Those rules are an associative array that map a rule with one or multiple roles

Public Methods

Method Description
__construct ( RoleService $roleService, array $rules = [] ) Constructor
isGranted ( MvcEvent $event ) {@inheritDoc}
setRules ( array $rules ) : void Set the rules (it overrides any existing rules)

Method Details

__construct() public method

Constructor
public __construct ( RoleService $roleService, array $rules = [] )
$roleService ZfcRbac\Service\RoleService
$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

$roleService protected_oe property

protected RoleService,ZfcRbac\Service $roleService
return ZfcRbac\Service\RoleService

$rules protected_oe property

Those rules are an associative array that map a rule with one or multiple roles
protected array $rules
return array