Download the PHP package pine3ree/p3-mezzio-controller without Composer
On this page you can find all versions of the php package pine3ree/p3-mezzio-controller. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pine3ree/p3-mezzio-controller
More information about pine3ree/p3-mezzio-controller
Files in pine3ree/p3-mezzio-controller
Package p3-mezzio-controller
Short Description A middleware wrapper for controller-like classes for mezzio/mezzio
License BSD-3-Clause
Homepage https://github.com/pine3ree/p3-mezzio-controller
Informations about the package p3-mezzio-controller
p3-mezzio-controller
A middleware wrapper for controller-like classes for mezzio/mezzio
STATUS
WIP!
Installation
You can install this library using Composer (with "minimum-stability": "dev"):
Documentation
You can now define 2 new types of route handled by generic-class controller methods:
Define a route using the callable-string format:
Define a route using the callable-array format:
Define routes using a configuration file:
These definitions works only on the condition that if the controller class exists and the target method is public.
As of now the target controller-method signature may be one of the following:
The controller class may be a simple contructor-less class. In most of cases it will have dependencies so it muste me defined in the container configuration along with its factory.
TODO:
- Add strategy to pass request attributes as arguments into the target controller-method
- Add strategy to allow null, string, array, xml, etc... return values from the controller-methods and build appropriate response based on the return type.
All versions of p3-mezzio-controller with dependencies
mezzio/mezzio Version ^3.0
psr/container Version ^1.0
psr/http-message Version ^1.0
psr/http-server-middleware Version ^1.0