Documentation

CallableMiddleware
in package
implements MiddlewareInterface

Adapts a plain callable into a MiddlewareInterface, so Client::addMiddleware() can accept a closure directly instead of requiring a full class

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
6.0.0

Table of Contents

Interfaces

MiddlewareInterface
Client middleware interface - a PSR-15-style interceptor for Client's outbound dispatch. Not a literal PSR-15 implementation: PSR-15's real interfaces are typed to ServerRequestInterface (server-side only) and cannot apply to a Client's outbound RequestInterface flow, so this mirrors PSR-15's shape with the request type swapped.

Properties

$callable  : callable
The wrapped callable

Methods

__construct()  : mixed
Constructor
process()  : ResponseInterface
Process the request by delegating to the wrapped callable

Properties

Methods

__construct()

Constructor

public __construct(callable $callable) : mixed
Parameters
$callable : callable

        
On this page

Search results