PHP Класс Bolt\EventListener\RedirectListener

Автор: Carson Full ([email protected])
Наследование: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$authentication Bolt\AccessControl\AccessChecker
$session Symfony\Component\HttpFoundation\Session\Session
$urlGenerator Symfony\Component\Routing\Generator\UrlGeneratorInterface
$users Bolt\Users

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

Метод Описание
__construct ( Symfony\Component\HttpFoundation\Session\Session $session, Symfony\Component\Routing\Generator\UrlGeneratorInterface $urlGenerator, Users $users, AccessChecker $authentication ) RedirectListener constructor.
getSubscribedEvents ( ) : array Return the events to subscribe to.
onResponse ( FilterResponseEvent $event ) Kernel response listener callback.

Защищенные методы

Метод Описание
handleLoginRetreat ( Request $request, RedirectResponse $response ) When redirecting to login page set the 'retreat' variable in the session.
handleNoBackendAccess ( RedirectResponse $response ) When redirecting to the backend dashboard (while logged in), if the user does not have access change the redirect to the homepage.

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

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

RedirectListener constructor.
public __construct ( Symfony\Component\HttpFoundation\Session\Session $session, Symfony\Component\Routing\Generator\UrlGeneratorInterface $urlGenerator, Users $users, AccessChecker $authentication )
$session Symfony\Component\HttpFoundation\Session\Session
$urlGenerator Symfony\Component\Routing\Generator\UrlGeneratorInterface
$users Bolt\Users
$authentication Bolt\AccessControl\AccessChecker

getSubscribedEvents() публичный статический Метод

Return the events to subscribe to.
public static getSubscribedEvents ( ) : array
Результат array

handleLoginRetreat() защищенный Метод

This allows a redirect back to the current page after successful login.
protected handleLoginRetreat ( Request $request, RedirectResponse $response )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\RedirectResponse

handleNoBackendAccess() защищенный Метод

When redirecting to the backend dashboard (while logged in), if the user does not have access change the redirect to the homepage.
protected handleNoBackendAccess ( RedirectResponse $response )
$response Symfony\Component\HttpFoundation\RedirectResponse

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

Kernel response listener callback.
public onResponse ( FilterResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterResponseEvent

Описание свойств

$authentication защищенное свойство

protected AccessChecker,Bolt\AccessControl $authentication
Результат Bolt\AccessControl\AccessChecker

$session защищенное свойство

protected Session,Symfony\Component\HttpFoundation\Session $session
Результат Symfony\Component\HttpFoundation\Session\Session

$urlGenerator защищенное свойство

protected UrlGeneratorInterface,Symfony\Component\Routing\Generator $urlGenerator
Результат Symfony\Component\Routing\Generator\UrlGeneratorInterface

$users защищенное свойство

protected Users,Bolt $users
Результат Bolt\Users