PHPackages                             ellipse/dispatcher-callable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ellipse/dispatcher-callable

ActiveLibrary

ellipse/dispatcher-callable
===========================

Psr-15 middleware dispatcher factory resolving callables

1.1.1(8y ago)0731MITPHPPHP &gt;=7.0

Since Jan 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ellipsephp/dispatcher-callable)[ Packagist](https://packagist.org/packages/ellipse/dispatcher-callable)[ Docs](https://github.com/ellipsephp/dispatcher-callable)[ RSS](/packages/ellipse-dispatcher-callable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (8)Versions (9)Used By (1)

Callable resolver
=================

[](#callable-resolver)

This package provides a factory decorator for objects implementing `Ellipse\DispatcherFactoryInterface` from [ellipse/dispatcher](https://github.com/ellipsephp/dispatcher) package. It allows to produce instances of `Ellipse\Dispatcher` using callables as middleware and request handler.

**Require** php &gt;= 7.0

**Installation** `composer require ellipse/dispatcher-callable`

**Run tests** `./vendor/bin/kahlan`

- [Create a dispatcher factory resolving callables](#create-a-dispatcher-factory-resolving-callables)

Create a dispatcher factory resolving callables
-----------------------------------------------

[](#create-a-dispatcher-factory-resolving-callables)

This package provides an `Ellipse\Dispatcher\CallableResolver` class implementing `Ellipse\DispatcherFactoryInterface` which allows to decorate any other object implementing this interface.

Once decorated, the resulting dispatcher factory can be used to produce instances of `Ellipse\Dispatcher` by resolving callables as `Ellipse\Middleware\CallableMiddleware` from the [ellipse/middleware-callable](https://github.com/ellipsephp/middleware-callable) package or as `Ellipse\Handlers\CallableRequestHandler` from the [ellipse/handlers-callable](https://github.com/ellipsephp/handlers-callable) package.

`CallableMiddleware` and `CallableRequestHandler` logic is described on the [ellipse/middleware-callable](https://github.com/ellipsephp/middleware-callable#using-callables-as-middleware) and [ellipse/handlers-callable](https://github.com/ellipsephp/handlers-callable#using-callables-as-request-handlers) documentation pages.

```
