Download the PHP package sirix/mezzio-routing-contracts without Composer
On this page you can find all versions of the php package sirix/mezzio-routing-contracts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sirix/mezzio-routing-contracts
More information about sirix/mezzio-routing-contracts
Files in sirix/mezzio-routing-contracts
Package mezzio-routing-contracts
Short Description Contracts for sirix/mezzio-routing-attributes route attribute modifiers
License MIT
Informations about the package mezzio-routing-contracts
Mezzio Routing Contracts
Contracts for sirix/mezzio-routing-attributes route attribute modifiers.
This package contains the stable public contract used by routing attributes that need to contribute middleware or default route options to a route definition.
Installation
Usage
Implement RouteAttributeModifierInterface on any route-related attribute to inject middleware and/or provide default route options.
Usage with routing attributes:
The routing-attributes package discovers all implementations of RouteAttributeModifierInterface at boot time and merges their middleware and defaults into the route definition.
Contract
getMiddleware()
Returns middleware identifiers that should be appended to the route pipeline.
Each item must be a middleware class name implementing Psr\Http\Server\MiddlewareInterface or another non-empty middleware identifier supported by the consuming router integration.
getDefaults()
Returns default route options keyed by option name. Consumers merge these values into the route defaults/options for the route that carries the attribute.
Versioning
The 1.x series follows Semantic Versioning.
Breaking changes to public contracts are reserved for the next major version.
All versions of mezzio-routing-contracts with dependencies
psr/container Version ^1.0 || ^2.0
psr/http-server-middleware Version ^1.0