php_dsl.php 544 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(['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->add('ouf', '/ouf')
  15. ->schemes(['https'])
  16. ->methods(['GET'])
  17. ->defaults(['id' => 0]);
  18. };