PHP 클래스 Symfony\Component\Security\Authorization\AccessDecisionManager

저자: Fabien Potencier ([email protected])
상속: implements Symfony\Component\Security\Authorization\AccessDecisionManagerInterface
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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.

메소드 상세

__construct() 공개 메소드

Constructor.
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

addVoter() 공개 메소드

Adds a voter.
public addVoter ( Symfony\Component\Security\Authorization\Voter\VoterInterface $voter )
$voter Symfony\Component\Security\Authorization\Voter\VoterInterface A VoterInterface instance

decide() 공개 메소드

public decide ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null )
$token Symfony\Component\Security\Authentication\Token\TokenInterface
$attributes array

decideAffirmative() 보호된 메소드

If all voters abstained from voting, the decision will be based on the allowIfAllAbstainDecisions property value (defaults to false).
protected decideAffirmative ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null )
$token Symfony\Component\Security\Authentication\Token\TokenInterface
$attributes array

decideConsensus() 공개 메소드

Consensus means majority-rule (ignoring abstains) rather than unanimous agreement (ignoring abstains). If you require unanimity, see UnanimousBased. If there were an equal number of grant and deny votes, the decision will be based on the allowIfEqualGrantedDeniedDecisions property value (defaults to true). If all voters abstained from voting, the decision will be based on the allowIfAllAbstainDecisions property value (defaults to false).
public decideConsensus ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null )
$token Symfony\Component\Security\Authentication\Token\TokenInterface
$attributes array

decideUnanimous() 공개 메소드

If all voters abstained from voting, the decision will be based on the allowIfAllAbstainDecisions property value (defaults to false).
public decideUnanimous ( Symfony\Component\Security\Authentication\Token\TokenInterface $token, array $attributes, $object = null )
$token Symfony\Component\Security\Authentication\Token\TokenInterface
$attributes array

getVoters() 공개 메소드

Returns all voters.
public getVoters ( ) : Symfony\Component\Security\Authorization\Voter\VoterInterface[]
리턴 Symfony\Component\Security\Authorization\Voter\VoterInterface[] $voters An array of VoterInterface instances

setVoters() 공개 메소드

Sets voters.
public setVoters ( array $voters )
$voters array An array of VoterInterface instances

supportsAttribute() 공개 메소드

public supportsAttribute ( $attribute )

supportsClass() 공개 메소드

public supportsClass ( $class )

프로퍼티 상세

$allowIfAllAbstainDecisions 보호되어 있는 프로퍼티

protected $allowIfAllAbstainDecisions

$allowIfEqualGrantedDeniedDecisions 보호되어 있는 프로퍼티

protected $allowIfEqualGrantedDeniedDecisions

$strategy 보호되어 있는 프로퍼티

protected $strategy

$voters 보호되어 있는 프로퍼티

protected $voters