class SessionMiddleware implements MiddlewareInterface (View source)

A middleware that handles the session in a HTTP request

Properties

protected array $sessionSettings
protected SessionManagerInterface $sessionManager

Methods

ResponseInterface
process(ServerRequestInterface $request, RequestHandlerInterface $next)

No description

ResponseInterface
handleSetCookie(ResponseInterface $response)

No description

prepareCookie(string $name, string $value)

Prepares a cookie object for the session.

Details

ResponseInterface process(ServerRequestInterface $request, RequestHandlerInterface $next)

No description

Parameters

ServerRequestInterface $request
RequestHandlerInterface $next

Return Value

ResponseInterface

protected ResponseInterface handleSetCookie(ResponseInterface $response)

No description

Parameters

ResponseInterface $response

Return Value

ResponseInterface

protected Cookie prepareCookie(string $name, string $value)

Prepares a cookie object for the session.

Parameters

string $name
string $value

Return Value

Cookie