PHP Класс Symfony\Component\Security\Core\SecurityContext

It gives access to the token representing the current user authentication.
Устаревший: since version 2.6, to be removed in 3.0.
Автор: Fabien Potencier ([email protected])
Автор: Johannes M. Schmitt ([email protected])
Наследование: implements Symfony\Component\Security\Core\SecurityContextInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface | Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface $tokenStorage, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface | Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface $authorizationChecker, boolean $alwaysAuthenticate = false ) For backwards compatibility, the signature of sf <2.6 still works.
getToken ( )
isGranted ( $attributes, $object = null )
setToken ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token = null )

Описание методов

__construct() публичный Метод

For backwards compatibility, the signature of sf <2.6 still works.
public __construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface | Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface $tokenStorage, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface | Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface $authorizationChecker, boolean $alwaysAuthenticate = false )
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface | Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface
$authorizationChecker Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface | Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface
$alwaysAuthenticate boolean only applicable with old signature

getToken() публичный Метод

Устаревший: since version 2.6, to be removed in 3.0. Use TokenStorageInterface::getToken() instead. {@inheritdoc}
public getToken ( )

isGranted() публичный Метод

Устаревший: since version 2.6, to be removed in 3.0. Use AuthorizationCheckerInterface::isGranted() instead. {@inheritdoc}
public isGranted ( $attributes, $object = null )

setToken() публичный Метод

Устаревший: since version 2.6, to be removed in 3.0. Use TokenStorageInterface::setToken() instead. {@inheritdoc}
public setToken ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token = null )
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface