PHPackages                             ellipse/handlers-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. [HTTP &amp; Networking](/categories/http)
4. /
5. ellipse/handlers-callable

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ellipse/handlers-callable
=========================

Psr-15 request handler proxying a callable

1.0.0(8y ago)01.6k1MITPHPPHP &gt;=7.0

Since Mar 13Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (2)Used By (1)

Request handler callable
========================

[](#request-handler-callable)

This package provides a [Psr-15](https://www.php-fig.org/psr/psr-15/) request handler proxying a callable.

**Require** php &gt;= 7.0

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

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

- [Using callables as request handlers](#using-callables-as-request-handlers)

Using callables as request handlers
-----------------------------------

[](#using-callables-as-request-handlers)

The class `Ellipse\Handlers\CallableRequestHandler` can be wrapped around a callable in order to use it as a request handler.

As any request handler `->handle()` method, the callable takes an implementation of `Psr\Http\Message\ServerRequestInterface` as parameter and should return an implementation of `Psr\Http\Message\ResponseInterface`.

```
