- Notifications
You must be signed in to change notification settings - Fork0
PSR-15 Middleware Microframework
License
arhimede/mezzio
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Develop PSR-7 middleware applications in minutes!
mezzio builds onlaminas-stratigilityto provide a minimalist PSR-7 middleware framework for PHP, with the followingfeatures:
- Routing. Choose your own router; we support:
- DI Containers, viaPSR-11 Container.Middleware matched via routing is retrieved from the composed container.
- Optionally, templating. We support:
We provide two ways to install Mezzio, both usingComposer: via ourskeleton project and installer,or manually.
The simplest way to install and get started is using the skeleton project, whichincludes installer scripts for choosing a router, dependency injectioncontainer, and optionally a template renderer and/or error handler. The skeletonalso provides configuration for officially supported dependencies.
To use the skeleton, use Composer'screate-project
command:
$ composer create-project mezzio/mezzio-skeleton<project dir>
This will prompt you through choosing your dependencies, and then create andinstall the project in the<project dir>
(omitting the<project dir>
willcreate and install in amezzio-skeleton/
directory).
You can install Mezzio standalone using Composer:
$ composer require mezzio/mezzio
However, at this point, Mezzio is not usable, as you need to supplyminimally:
- a router.
- a dependency injection container.
We currently support and provide the following routing integrations:
- Aura.Router:
composer require mezzio/mezzio-aurarouter
- FastRoute:
composer require mezzio/mezzio-fastroute
- laminas-router:
composer require mezzio/mezzio-laminasrouter
We recommend using a dependency injection container, and typehint againstPSR-11 Container. Wecan recommend the following implementations:
- laminas-servicemanager:
composer require laminas/laminas-servicemanager
- Pimple (seedocs for more details):
composer require laminas/laminas-pimple-config
- Aura.Di (seedocs for more details):
composer require laminas/laminas-auradi-config
Additionally, you may optionally want to install a template rendererimplementation, and/or an error handling integration. These are covered in thedocumentation.
Documentation isin the doc tree, and can be compiled usingmkdocs:
$ mkdocs build
Additionally, public-facing, browseable documentation is available athttps://docs.mezzio.dev/mezzio/
About
PSR-15 Middleware Microframework
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- PHP100.0%