PHP Class Psr7Middlewares\Middleware\PhpSession

Inheritance: use trait Psr7Middlewares\Utils\StorageTrait
Exibir arquivo Open project: oscarotero/psr7-middlewares

Public Methods

Method Description
__construct ( null | string $name = null ) Constructor. Defines de session name.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
id ( string $id ) : self Configure the session id.
name ( string $name ) : self Configure the session name.

Method Details

__construct() public method

Constructor. Defines de session name.
public __construct ( null | string $name = null )
$name null | string

__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

id() public method

Configure the session id.
public id ( string $id ) : self
$id string
return self

name() public method

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