private static function setAttribute(ServerRequestInterface $request, $name, $value)
    {
        $attributes = $request->getAttribute(Middleware::KEY, []);
        $attributes[$name] = $value;

        return $request->withAttribute(Middleware::KEY, $attributes);
    }
private static function setAttribute(ServerRequestInterface $request, $name, $value)
    {
        $attributes = $request->getAttribute(Middleware::KEY, []);
        $attributes[$name] = $value;

        return $request->withAttribute(Middleware::KEY, $attributes);
    }
private static function setAttribute ( ServerRequestInterface $ request , $ name , $ value ) { $ attributes = $ request -> getAttribute ( Middleware :: KEY , [ ] ) ; $ attributes [ $ name ] = $ value ; return $ request -> withAttribute ( Middleware :: KEY , $ attributes ) ; }
Store an attribute in the request.

@param ServerRequestInterface $request
@param string                 $name
@param mixed                  $value

@return ServerRequestInterface
Store an attribute in the request .