Download the PHP package project-a/silex-routing without Composer
On this page you can find all versions of the php package project-a/silex-routing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download project-a/silex-routing
More information about project-a/silex-routing
Files in project-a/silex-routing
Package silex-routing
Short Description Silex-Routing provides advanced routing for Silex through connecting symfony-cmf/Routing with Silex.
License MIT
Informations about the package silex-routing
Silex-Routing
Serviceprovider for advanced and dynamic routing in Silex
Description
Silex-Routing allows you to define custom and multiple routers for Silex. This is especially useful when working with dynamic routes, which are not known while writing the code (e.g. URLs stored in database).
This implementation works for both, matching and generating of URLs.
The advanced routing is achieved by connecting Silex with symfony-cmf/Routing.
Installation
The recommended way to install Silex-Routing is through
composer. Just create a composer.json
file and
run the php composer.phar install
command to install it:
{
"require": {
"project-a/silex-routing": "dev-master"
}
}
Alternatively, you can download the silexrouting.zip
file and extract it.
Upgrade from 1.0 to 2.0
Version 2 is not backward compatible with version 1. Make sure to carefully read the changelog.
Usage
Using Silex-Routing is very simple. All you need to do is register the provided and afterwards add all your custom routers ().
There is a router in this repository named , that handles the default routing behavior of Silex. Registering this router ensures, that all routes added through the main Silex application still work. (This router is not registered by default.)
Since version 2.0 of project-a/silex-routing the url generation is included in the and no special is needed anymore.
Tests
To run the test suite, you need composer.
$ php composer.phar install --dev
$ phpunit
License
Silex-Routing is licensed under the MIT license.
All versions of silex-routing with dependencies
silex/silex Version ^2.0
symfony/routing Version ^2.8|^3.0
symfony-cmf/routing Version ^1.0|^2.0