Documentation

Mock
in package
implements MiddlewareInterface

A Mock Middleware

This middleware will unconditionally return a prefabricated a response

Returns a preset response

Table of Contents

Interfaces

MiddlewareInterface

Properties

$response  : ResponseInterface

Methods

__construct()  : mixed
process()  : ResponseInterface
Process the incoming request

Properties

$response

private ResponseInterface $response

Methods

__construct()

public __construct(ResponseInterface $response) : mixed
Parameters
$response : ResponseInterface

process()

Process the incoming request

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface

Produce an own response object, do not delegate to handler

Parameters
$request : ServerRequestInterface

The request

$handler : RequestHandlerInterface

The controlling request handler

Return values
ResponseInterface

        
On this page

Search results