validresource.php 478 B

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