shiroyuki / route-bundle
Shiroyuki RouteBundle
Package info
github.com/shiroyuki/RouteBundle
Type:symfony-bundle
pkg:composer/shiroyuki/route-bundle
dev-master / 1.0.x-dev
2012-10-26 18:44 UTC
Requires
- php: >=5.3.2
- symfony/symfony: >=2.1.0
This package is not auto-updated.
Last update: 2026-03-14 20:36:11 UTC
README
Route Utility Bundle for Symfony 2.x
Install
- Add
shiroyuki/route-bundleto the required section ofcomposer.json. - After updating your vendor folder, register the bundle to the
app/AppKernel.php. - Make sure that your security settings allow the access.
Usage
First, import the javascript from the controller.
<script src="{{ path('shiroyuki_route_route_offline_router') }}"></script>
Then, instantiate the offline router.
var router = new OfflineRouter();
There is only one interface.
// suppose PARAMETERS is a one-dimentional associate array. (String) router.get(ROUTE_ID, PARAMETERS);
Please note that unknown parameters for a route will be ignored.