PHP Class Psr7Middlewares\Middleware\IncludeResponse

Inheritance: use trait Psr7Middlewares\Utils\FileTrait, use trait Psr7Middlewares\Utils\StreamTrait
Show file Open project: oscarotero/psr7-middlewares

Public Methods

Method Description
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
continueOnError ( boolean $continueOnError = true ) : self Configure if continue to the next middleware if the response has not found.

Private Methods

Method Description
includeFile ( string $file ) : string Includes a php file from a static context.

Method Details

__invoke() public method

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
return Psr\Http\Message\ResponseInterface

continueOnError() public method

Configure if continue to the next middleware if the response has not found.
public continueOnError ( boolean $continueOnError = true ) : self
$continueOnError boolean
return self