php_dsl.php 715 B

1234567891011121314151617181920212223242526272829
  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(['utf8' => true])
  9. ->add('buz', 'zub')
  10. ->controller('foo:act');
  11. $routes->import('php_dsl_sub.php')
  12. ->prefix('/sub')
  13. ->requirements(['id' => '\d+']);
  14. $routes->import('php_dsl_sub.php')
  15. ->namePrefix('z_')
  16. ->prefix('/zub');
  17. $routes->import('php_dsl_sub_root.php')
  18. ->prefix('/bus', false);
  19. $routes->add('ouf', '/ouf')
  20. ->schemes(['https'])
  21. ->methods(['GET'])
  22. ->defaults(['id' => 0]);
  23. };