Download the PHP package northwoods/broker without Composer
On this page you can find all versions of the php package northwoods/broker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download northwoods/broker
More information about northwoods/broker
Files in northwoods/broker
Package broker
Short Description Dead simple PSR-15 middleware dispatcher
License MIT
Informations about the package broker
Northwoods Broker
Broker is a dead simple PSR-15 middleware dispatcher. Broker implements
both RequestHandlerInterface
and MiddlewareInterface
for maximum flexibility.
Install
Usage
append(...$middleware)
Add one or more middleware to the end of the stack.
prepend(...$middleware)
Add one or more middleware to be beginning of the stack.
handle($request)
Dispatch the middleware stack as a request handler. If the end of the stack is
reached and no response has been generated, an OutOfBoundsException
will
be thrown.
process($request, $handler)
Dispatch the middleware stack as a middleware. If the end of the stack is reached
and no response has been generated, the $handler
will be called.
Suggested Packages
- Conditional middleware execution can be provided by northwoods/conditional-middleware
- Lazy middleware instantiation can be provided by northwoods/lazy-middleware
- Response sending can be provided by http-interop/response-sender