An open API service indexing awesome lists of open source software.

https://github.com/pmall/handlers-container

Resolver producing Psr-15 request handlers from class names using a Psr-11 container
https://github.com/pmall/handlers-container

container psr-11 psr-15 request-handler resolver

Last synced: 17 days ago
JSON representation

Resolver producing Psr-15 request handlers from class names using a Psr-11 container

Awesome Lists containing this project

README

          

# Container request handlers resolver

This package provides a resolver producing Psr-15 request handlers from class names using a Psr-11 container.

**Require** php >= 7.1

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

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

- [Using the container request handlers resolver](#using-the-container-request-handlers-resolver)

## Using the container request handlers resolver

Please note the request handler instances are resolved using [ellipse/container-reflection](https://github.com/ellipsephp/container-reflection) auto-wiring feature.

Also when instances of `Psr\Http\Message\ServerRequestInterface` are needed to build a request handler instance, the one received by its `->handle()` method is injected.

```php