ideationnet/action-resolver

This package is abandoned and no longer maintained. The author suggests using the ideationnet/invoker-router-middleware package instead.

Simple fast-route based action resolver for PSR-15 compatible middleware

1.0.0 2016-12-14 14:23 UTC

This package is not auto-updated.

Last update: 2019-02-20 19:06:26 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'],
],