Documentation

DefaultHandlerTrait

Default Handler Trait.

Table of Contents

Properties

$responseFactory  : ResponseFactoryInterface
$streamFactory  : StreamFactoryInterface

Methods

__construct()  : mixed
handle()  : ResponseInterface
Handle a request

Properties

Methods

__construct()

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

handle()

Handle a request

public handle(RequestInterface $request) : ResponseInterface

Each middleware will either create a response or return control to the handler.

If the middlewares created no response, the payload handler will.

Finally the we will return a response ourselves.

Parameters
$request : RequestInterface
Return values
ResponseInterface

        
On this page

Search results