PHP Class Psr7Middlewares\Middleware\FormTimestamp

Inheritance: use trait Psr7Middlewares\Utils\FormTrait, use trait Psr7Middlewares\Utils\CryptTrait, use trait Psr7Middlewares\Utils\AttributeTrait
Afficher le fichier Open project: oscarotero/psr7-middlewares

Méthodes publiques

Méthode 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

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

Method Details

__invoke() public méthode

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
Résultat Psr\Http\Message\ResponseInterface

getGenerator() public static méthode

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

inputName() public méthode

Set the field name.
public inputName ( string $inputName ) : self
$inputName string
Résultat self

max() public méthode

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

min() public méthode

Minimum time required.
public min ( integer $seconds ) : self
$seconds integer
Résultat self