0 follower

Final Class Yiisoft\Yii\Middleware\TagRequest

InheritanceYiisoft\Yii\Middleware\TagRequest
ImplementsPsr\Http\Server\MiddlewareInterface
Deprecated since version Use `TagRequestMiddleware` from `yiisoft/http-middleware` package instead.

Tags request with a random value that could be later used for identifying it.

Public Methods

Hide inherited methods

Method Description Defined By
process() Yiisoft\Yii\Middleware\TagRequest

Method Details

Hide inherited methods

process() public method

public \Psr\Http\Message\ResponseInterface process ( \Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler )
$request \Psr\Http\Message\ServerRequestInterface
$handler \Psr\Http\Server\RequestHandlerInterface

                public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
    return $handler->handle($request->withAttribute('requestTag', $this->getRequestTag()));
}