PHP Class Psr7Middlewares\Middleware\FormTimestamp

Inheritance: use trait Psr7Middlewares\Utils\FormTrait, use trait Psr7Middlewares\Utils\CryptTrait, use trait Psr7Middlewares\Utils\AttributeTrait
Datei anzeigen Open project: oscarotero/psr7-middlewares

Public Methods

Method Description
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
getGenerator ( Psr\Http\Message\ServerRequestInterface $request ) : callable | null Returns a callable to generate the inputs.
inputName ( string $inputName ) : self Set the field name.
max ( integer $seconds ) : self Max time before expire the form.
min ( integer $seconds ) : self Minimum time required.

Private Methods

Method Description
isValid ( Psr\Http\Message\ServerRequestInterface $request ) : boolean Check whether the request is valid.

Method Details

__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

getGenerator() public static method

Returns a callable to generate the inputs.
public static getGenerator ( Psr\Http\Message\ServerRequestInterface $request ) : callable | null
$request Psr\Http\Message\ServerRequestInterface
return callable | null

inputName() public method

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

max() public method

Max time before expire the form.
public max ( integer $seconds ) : self
$seconds integer
return self

min() public method

Minimum time required.
public min ( integer $seconds ) : self
$seconds integer
return self