菜谱项目

validresource.php 546B

12345678910111213141516171819202122
  1. <?php
  2. if (function_exists('__phpunit_run_isolated_test')) {
  3. return;
  4. }
  5. /** @var $loader \Symfony\Component\Routing\Loader\PhpFileLoader */
  6. /** @var \Symfony\Component\Routing\RouteCollection $collection */
  7. $collection = $loader->import('validpattern.php');
  8. $collection->addDefaults(array(
  9. 'foo' => 123,
  10. ));
  11. $collection->addRequirements(array(
  12. 'foo' => '\d+',
  13. ));
  14. $collection->addOptions(array(
  15. 'foo' => 'bar',
  16. ));
  17. $collection->setCondition('context.getMethod() == "POST"');
  18. $collection->addPrefix('/prefix');
  19. return $collection;