Documentation

Responder
in package
implements MiddlewareInterface

A Responder Middleware

This middleware will unconditionally create a response

Use this as a copy/paste template for starting own middleware

Table of Contents

Interfaces

MiddlewareInterface

Properties

$responseFactory  : ResponseFactoryInterface
$streamFactory  : StreamFactoryInterface

Methods

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

Properties

$responseFactory

protected ResponseFactoryInterface $responseFactory

$streamFactory

protected StreamFactoryInterface $streamFactory

Methods

__construct()

public __construct(ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory) : mixed
Parameters
$responseFactory : ResponseFactoryInterface
$streamFactory : StreamFactoryInterface

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