PHP Class Psr7Middlewares\Middleware\SaveResponse

Inheritance: use trait Psr7Middlewares\Utils\FileTrait
Afficher le fichier Open project: oscarotero/psr7-middlewares

Méthodes publiques

Méthode Description
__invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.

Private Methods

Méthode Description
canSave ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean Check whether the response can be saved or not.
writeStream ( Psr\Http\Message\StreamInterface $stream, string $path ) Write the stream to the given path.

Method Details

__invoke() public méthode

Execute the middleware.
public __invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
Résultat Psr\Http\Message\ResponseInterface