validpattern.php 474 B

12345678910111213141516171819
  1. <?php
  2. use Symfony\Component\Routing\RouteCollection;
  3. use Symfony\Component\Routing\Route;
  4. $collection = new RouteCollection();
  5. $collection->add('blog_show', new Route(
  6. '/blog/{slug}',
  7. array('_controller' => 'MyBlogBundle:Blog:show'),
  8. array('locale' => '\w+'),
  9. array('compiler_class' => 'RouteCompiler'),
  10. '{locale}.example.com',
  11. array('https'),
  12. array('GET', 'POST', 'put', 'OpTiOnS'),
  13. 'context.getMethod() == "GET"'
  14. ));
  15. return $collection;