PHP Class Bolt\Session\SessionListener

Author: Carson Full ([email protected])
Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Show file Open project: bolt/bolt

Protected Properties

Property Type Description
$options Bolt\Session\OptionsBag
$session Symfony\Component\HttpFoundation\Session\SessionInterface

Public Methods

Method Description
__construct ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Bolt\Session\OptionsBag $options ) Constructor.
getSubscribedEvents ( )
onRequest ( GetResponseEvent $event ) Set the session ID from request cookies
onResponse ( FilterResponseEvent $event ) Add the session cookie to the response if it is started.

Protected Methods

Method Description
appendRealmToName ( Request $request )
generateCookie ( )
prependBasePathToCookie ( Request $request )

Method Details

__construct() public method

Constructor.
public __construct ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Bolt\Session\OptionsBag $options )
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$options Bolt\Session\OptionsBag

appendRealmToName() protected method

protected appendRealmToName ( Request $request )
$request Symfony\Component\HttpFoundation\Request

generateCookie() protected method

protected generateCookie ( )

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

onRequest() public method

Set the session ID from request cookies
public onRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent

onResponse() public method

Add the session cookie to the response if it is started.
public onResponse ( FilterResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterResponseEvent

prependBasePathToCookie() protected method

protected prependBasePathToCookie ( Request $request )
$request Symfony\Component\HttpFoundation\Request

Property Details

$options protected property

protected OptionsBag,Bolt\Session $options
return Bolt\Session\OptionsBag

$session protected property

protected SessionInterface,Symfony\Component\HttpFoundation\Session $session
return Symfony\Component\HttpFoundation\Session\SessionInterface