]>
Commit | Line | Data |
---|---|---|
4f5b44bd NL |
1 | <?php |
2 | use Symfony\Component\Routing\RouteCollection; | |
3 | use Symfony\Component\Routing\Route; | |
4 | ||
5 | $collection = new RouteCollection(); | |
6 | $collection->add('blog_show', new Route( | |
7 | '/blog/{slug}', | |
8 | array('_controller' => 'MyBlogBundle:Blog:show'), | |
9 | array('locale' => '\w+'), | |
10 | array('compiler_class' => 'RouteCompiler'), | |
11 | '{locale}.example.com', | |
12 | array('https'), | |
13 | array('GET','POST','put','OpTiOnS') | |
14 | )); | |
15 | $collection->add('blog_show_legacy', new Route( | |
16 | '/blog/{slug}', | |
17 | array('_controller' => 'MyBlogBundle:Blog:show'), | |
18 | array('_method' => 'GET|POST|put|OpTiOnS', '_scheme' => 'https', 'locale' => '\w+',), | |
19 | array('compiler_class' => 'RouteCompiler'), | |
20 | '{locale}.example.com' | |
21 | )); | |
22 | ||
23 | return $collection; |