PHP 클래스 Bolt\EventListener\RedirectListener

저자: Carson Full ([email protected])
상속: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
파일 보기 프로젝트 열기: bolt/bolt

보호된 프로퍼티들

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