PHP Class Psr7Middlewares\Middleware\AuraSession

Show file Open project: oscarotero/psr7-middlewares

Public Methods

Method Description
__construct ( Aura\Session\SessionFactory $factory = null ) Set the session factory.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
getSession ( Psr\Http\Message\ServerRequestInterface $request ) : Aura\Session\Session | null Returns the session instance.
name ( string $name ) : self Set the session name.

Method Details

__construct() public method

Set the session factory.
public __construct ( Aura\Session\SessionFactory $factory = null )
$factory Aura\Session\SessionFactory

__invoke() public method

Execute the middleware.
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
return Psr\Http\Message\ResponseInterface

getSession() public static method

Returns the session instance.
public static getSession ( Psr\Http\Message\ServerRequestInterface $request ) : Aura\Session\Session | null
$request Psr\Http\Message\ServerRequestInterface
return Aura\Session\Session | null

name() public method

Set the session name.
public name ( string $name ) : self
$name string
return self