3 use Symfony\Component\Routing\Route;
4 use Symfony\Component\Routing\RouteCollection;
6 $collection = new RouteCollection();
7 $collection->add('blog_show', new Route(
9 array('_controller' => 'MyBlogBundle:Blog:show'),
10 array('locale' => '\w+'),
11 array('compiler_class' => 'RouteCompiler'),
12 '{locale}.example.com',
14 array('GET', 'POST', 'put', 'OpTiOnS'),
15 'context.getMethod() == "GET"'