php_dsl.php 569 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Symfony\Component\Routing\Loader\Configurator;
  3. return function (RoutingConfigurator $routes) {
  4. $routes
  5. ->collection()
  6. ->add('foo', '/foo')
  7. ->condition('abc')
  8. ->options(array('utf8' => true))
  9. ->add('buz', 'zub')
  10. ->controller('foo:act');
  11. $routes->import('php_dsl_sub.php')
  12. ->prefix('/sub')
  13. ->requirements(array('id' => '\d+'));
  14. $routes->add('ouf', '/ouf')
  15. ->schemes(array('https'))
  16. ->methods(array('GET'))
  17. ->defaults(array('id' => 0));
  18. };