PHP Класс Psr7Middlewares\Middleware\Uuid

Наследование: use trait Psr7Middlewares\Utils\AttributeTrait
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( integer | null $version = null ) Constructor. Set the version of UUID.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
getUuid ( Psr\Http\Message\ServerRequestInterface $request ) : Ramsey\Uuid\Uuid | null Returns the Uuid instance.
header ( false | string $header ) : self Set whether the Uuid is stored in the header.
version ( integer $version ) : self Choose the Uuid version.

Приватные методы

Метод Описание
generateUuid ( ) : string Generate the uuid with the current configuration.

Описание методов

__construct() публичный Метод

Constructor. Set the version of UUID.
public __construct ( integer | null $version = null )
$version integer | null

__invoke() публичный Метод

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
Результат Psr\Http\Message\ResponseInterface

getUuid() публичный статический Метод

Returns the Uuid instance.
public static getUuid ( Psr\Http\Message\ServerRequestInterface $request ) : Ramsey\Uuid\Uuid | null
$request Psr\Http\Message\ServerRequestInterface
Результат Ramsey\Uuid\Uuid | null

header() публичный Метод

Set false to do not store.
public header ( false | string $header ) : self
$header false | string
Результат self

version() публичный Метод

Choose the Uuid version.
public version ( integer $version ) : self
$version integer 1, 3, 4 or 5
Результат self