VoterInterface
in
VoterInterface is the interface implemented by all voters.
Tags
Table of Contents
Constants
- ACCESS_ABSTAIN = 0
- ACCESS_DENIED = -1
- ACCESS_GRANTED = 1
Methods
- vote() : int
- Returns the vote for the given parameters.
Constants
ACCESS_ABSTAIN
public
mixed
ACCESS_ABSTAIN
= 0
ACCESS_DENIED
public
mixed
ACCESS_DENIED
= -1
ACCESS_GRANTED
public
mixed
ACCESS_GRANTED
= 1
Methods
vote()
Returns the vote for the given parameters.
public
vote(TokenInterface $token, mixed $subject, array<string|int, mixed> $attributes) : int
This method must return one of the following constants: ACCESS_GRANTED, ACCESS_DENIED, or ACCESS_ABSTAIN.
Parameters
- $token : TokenInterface
- $subject : mixed
-
The subject to secure
- $attributes : array<string|int, mixed>
-
An array of attributes associated with the method being invoked
Return values
int —either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED