AccessDecisionManager
in package
implements
AccessDecisionManagerInterface
FinalYes
AccessDecisionManager is the base class for all access decision managers that use decision voters.
Tags
Table of Contents
Interfaces
- AccessDecisionManagerInterface
- AccessDecisionManagerInterface makes authorization decisions.
Constants
- VALID_VOTES = [\Symfony\Component\Security\Core\Authorization\Voter\VoterInterface::ACCESS_GRANTED => true, \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface::ACCESS_DENIED => true, \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface::ACCESS_ABSTAIN => true]
Properties
- $strategy : mixed
- $voters : iterable<string|int, mixed>
- $votersCacheAttributes : array<string|int, mixed>
- $votersCacheObject : array<string|int, mixed>
Methods
- __construct() : mixed
- decide() : bool
- Decides whether the access is possible or not.
- collectResults() : Traversable<int, int>
- getVoters() : iterable<mixed, VoterInterface>
Constants
VALID_VOTES
private
mixed
VALID_VOTES
= [\Symfony\Component\Security\Core\Authorization\Voter\VoterInterface::ACCESS_GRANTED => true, \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface::ACCESS_DENIED => true, \Symfony\Component\Security\Core\Authorization\Voter\VoterInterface::ACCESS_ABSTAIN => true]
Properties
$strategy
private
mixed
$strategy
$voters
private
iterable<string|int, mixed>
$voters
$votersCacheAttributes
private
array<string|int, mixed>
$votersCacheAttributes
= []
$votersCacheObject
private
array<string|int, mixed>
$votersCacheObject
= []
Methods
__construct()
public
__construct([iterable<mixed, VoterInterface> $voters = [] ][, AccessDecisionStrategyInterface $strategy = null ]) : mixed
Parameters
- $voters : iterable<mixed, VoterInterface> = []
-
An array or an iterator of VoterInterface instances
- $strategy : AccessDecisionStrategyInterface = null
decide()
Decides whether the access is possible or not.
public
decide(TokenInterface $token, array<string|int, mixed> $attributes[, mixed $object = null ][, bool $allowMultipleAttributes = false ]) : bool
Parameters
- $token : TokenInterface
- $attributes : array<string|int, mixed>
-
An array of attributes associated with the method being invoked
- $object : mixed = null
-
The object to secure
- $allowMultipleAttributes : bool = false
-
Whether to allow passing multiple values to the $attributes array
Return values
boolcollectResults()
private
collectResults(TokenInterface $token, array<string|int, mixed> $attributes, mixed $object) : Traversable<int, int>
Parameters
- $token : TokenInterface
- $attributes : array<string|int, mixed>
- $object : mixed
Return values
Traversable<int, int>getVoters()
private
getVoters(array<string|int, mixed> $attributes[, mixed $object = null ]) : iterable<mixed, VoterInterface>
Parameters
- $attributes : array<string|int, mixed>
- $object : mixed = null