ideationnet / action-resolver
Simple fast-route based action resolver for PSR-15 compatible middleware
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/ideationnet/action-resolver
Requires
- php: ~7.0
- http-interop/http-middleware: ^0.3.0
- nikic/fast-route: ^1.0
This package is not auto-updated.
Last update: 2022-02-01 13:03:47 UTC
README
A PSR-15 middleware that uses Fast Route to resolve actions from the request path.
Use with Action Dispatcher to dispatch resolved actions using an Invoker, such as the one provided by PHP-DI.
Configuration
A default configuration is provided for PHP-DI. In addition to the provided configuration, you need to provide an array of routes:
'routes' => [ [['GET', 'POST'], '/example/{id}', 'action.label'], ],