StartSession
class StartSession
Properties
protected SessionManager | $manager | The session manager. |
|
protected bool | $sessionHandled | Indicates if the session was handled for the current request. |
Methods
Determine if the configuration odds hit the lottery.
Store the current URL for the request if necessary.
Add the session cookie to the application response.
Get the session lifetime in seconds.
Get the cookie lifetime in seconds.
Determine if a session driver has been configured.
Determine if the configured session driver is persistent.
Determine if the session is using cookie sessions.
Details
at line 37
void
__construct(SessionManager $manager)
Create a new session middleware.
at line 85
void
terminate(Request $request, Response $response)
Perform any final actions for the request lifecycle.
at line 98
protected Session
startSession(Request $request)
Start the session for the given request.
at line 126
protected void
collectGarbage(Session $session)
Remove the garbage from the session if necessary.
at line 144
protected bool
configHitsLottery(array $config)
Determine if the configuration odds hit the lottery.
at line 156
protected void
storeCurrentUrl(Request $request, Session $session)
Store the current URL for the request if necessary.
at line 170
protected void
addCookieToResponse(Response $response, Session $session)
Add the session cookie to the application response.
at line 190
protected int
getSessionLifetimeInSeconds()
Get the session lifetime in seconds.
at line 200
protected DateTimeInterface
getCookieExpirationDate()
Get the cookie lifetime in seconds.
at line 212
protected bool
sessionConfigured()
Determine if a session driver has been configured.
at line 223
protected bool
sessionIsPersistent(array $config = null)
Determine if the configured session driver is persistent.
at line 235
protected bool
usingCookieSessions()
Determine if the session is using cookie sessions.