Symfony2 Bundle that provides a RFC-6570 compatible router and URL Generator.

Installs: 225 298

Dependents: 18

Suggesters: 0

Stars: 44

Watchers: 19

Forks: 6

Open Issues: 2

Type: symfony-bundle

2.0.0 2014-07-28 21:56 UTC


Symfony2 Bundle for the https://github.com/hautelook/TemplatedUriRouter library.

Build Status SensioLabsInsight


Run the following command (assuming you have installed composer.phar or composer binary), or add to your composer.json and run composer install:

$ composer require "hautelook/templated-uri-bundle ~2.0"

Now add the bundle to your Kernel:

// app/AppKernel.php

public function registerBundles()
    $bundles = array(
        // ...
        new Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle(),
        // ...


The bundle exposes a router service (hautelook.router.template) that will generate RFC-6570 compliant URLs. Here is a sample on how you could use it:

$templateLink = $this->get('hautelook.router.template')->generate('hautelook_demo_route',
        'page'   => '{page}',
        'sort'   => array('{sort}'),
        'filter' => array('{filter}'),

This will produce a link similar to: