Documentation

RequestHandler
in package
implements RequestHandlerInterface

PSR-15 request handler class

Wraps a plain closure (Pop's own "what happens when the middleware chain is exhausted" concept) as a PSR-15 terminal request handler.

Tags
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
5.0.0

Table of Contents

Interfaces

RequestHandlerInterface

Properties

$dispatch  : Closure
Dispatch closure

Methods

__construct()  : mixed
Constructor
handle()  : ResponseInterface
Handle the request

Properties

Methods

__construct()

Constructor

public __construct(Closure $dispatch) : mixed

Instantiate the request handler object.

Parameters
$dispatch : Closure

handle()

Handle the request

public handle(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

        
On this page

Search results