From e491f8d77184e89639c59f7f4d8ed8c05a67ee86 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Mon, 28 Jan 2013 11:49:26 +0100 Subject: [PATCH] Add bound names to routes --- lib/Alchemy/Phrasea/Application/Lightbox.php | 4 +++- lib/Alchemy/Phrasea/Application/Root.php | 2 +- lib/Alchemy/Phrasea/Controller/Prod/Root.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/Application/Lightbox.php b/lib/Alchemy/Phrasea/Application/Lightbox.php index 5ea3c79b42..b8205d8ba3 100644 --- a/lib/Alchemy/Phrasea/Application/Lightbox.php +++ b/lib/Alchemy/Phrasea/Application/Lightbox.php @@ -276,7 +276,9 @@ class Lightbox implements ControllerProviderInterface $response->setCharset('UTF-8'); return $response; - })->assert('ssel_id', '\d+'); + }) + ->assert('ssel_id', '\d+') + ->bind('lightbox_compare') ; $controllers->get('/feeds/entry/{entry_id}/', function (SilexApplication $app, $entry_id) { diff --git a/lib/Alchemy/Phrasea/Application/Root.php b/lib/Alchemy/Phrasea/Application/Root.php index 979cad6278..699280e0b6 100644 --- a/lib/Alchemy/Phrasea/Application/Root.php +++ b/lib/Alchemy/Phrasea/Application/Root.php @@ -97,7 +97,7 @@ return call_user_func(function($environment = null) { } else { return $app->redirect("/login/?redirect=client"); } - }); + })->bind('root'); $app->get('/robots.txt', function(PhraseaApplication $app) { diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Root.php b/lib/Alchemy/Phrasea/Controller/Prod/Root.php index 59283e052a..54069ea835 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Root.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Root.php @@ -125,7 +125,7 @@ class Root implements ControllerProviderInterface 'thesau_json_bas2sbas' => json_encode($bas2sbas), 'thesau_languages' => $app->getAvailableLanguages(), )); - }); + })->bind('prod'); return $controllers; }