mediatekformation

RoleVoter
in package
implements VoterInterface

RoleVoter votes if any attribute starts with a given prefix.

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes, Traits and Enums

VoterInterface
VoterInterface is the interface implemented by all voters.

Table of Contents

$prefix  : mixed
__construct()  : mixed
vote()  : int
Returns the vote for the given parameters.
extractRoles()  : mixed

Properties

Methods

__construct()

public __construct([string $prefix = 'ROLE_' ]) : mixed
Parameters
$prefix : string = 'ROLE_'
Return values
mixed

vote()

Returns the vote for the given parameters.

public vote(TokenInterface $token, mixed $subject, array<string|int, mixed> $attributes) : int
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

Search results