Documentation

AccessDecisionManager
in package
implements AccessDecisionManagerInterface

FinalYes

AccessDecisionManager is the base class for all access decision managers that use decision voters.

Tags
author

Fabien Potencier fabien@symfony.com

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

Methods

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
bool

collectResults()

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
Return values
iterable<mixed, VoterInterface>

        
On this page

Search results