Свойство | Тип | Описание | |
---|---|---|---|
$allowIfAllAbstainDecisions | |||
$allowIfEqualGrantedDeniedDecisions | |||
$strategy | |||
$voters |
Метод | Описание | |
---|---|---|
__construct ( array $voters = [], string $strategy = 'affirmative', boolean $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true ) | Constructor. | |
addVoter ( Symfony\Component\Security\Authorization\Voter\VoterInterface $voter ) | Adds a voter. | |
decide ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null ) | ||
decideConsensus ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null ) | Grants access if there is consensus of granted against denied responses. | |
decideUnanimous ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null ) | Grants access if only grant (or abstain) votes were received. | |
getVoters ( ) : Symfony\Component\Security\Authorization\Voter\VoterInterface[] | Returns all voters. | |
setVoters ( array $voters ) | Sets voters. | |
supportsAttribute ( $attribute ) | ||
supportsClass ( $class ) |
Метод | Описание | |
---|---|---|
decideAffirmative ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null ) | Grants access if any voter returns an affirmative response. |
public __construct ( array $voters = [], string $strategy = 'affirmative', boolean $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true ) | ||
$voters | array | An array of VoterInterface instances |
$strategy | string | The vote strategy |
$allowIfAllAbstainDecisions | boolean | Whether to grant access if all voters abstained or not |
public addVoter ( Symfony\Component\Security\Authorization\Voter\VoterInterface $voter ) | ||
$voter | Symfony\Component\Security\Authorization\Voter\VoterInterface | A VoterInterface instance |
protected decideAffirmative ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null ) | ||
$token | Symfony\Component\Security\Authentication\Token\TokenInterface | |
$attributes | array |
public decideConsensus ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null ) | ||
$token | Symfony\Component\Security\Authentication\Token\TokenInterface | |
$attributes | array |
public decideUnanimous ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null ) | ||
$token | Symfony\Component\Security\Authentication\Token\TokenInterface | |
$attributes | array |
public getVoters ( ) : Symfony\Component\Security\Authorization\Voter\VoterInterface[] | ||
Результат | Symfony\Component\Security\Authorization\Voter\VoterInterface[] | $voters An array of VoterInterface instances |
protected $allowIfEqualGrantedDeniedDecisions |