shiroyuki/route-bundle

Shiroyuki RouteBundle

Installs: 26

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master / 1.0.x-dev 2012-10-26 18:44 UTC

This package is not auto-updated.

Last update: 2025-01-18 15:01:21 UTC


README

Route Utility Bundle for Symfony 2.x

Install

  1. Add shiroyuki/route-bundle to the required section of composer.json.
  2. After updating your vendor folder, register the bundle to the app/AppKernel.php.
  3. 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.