DefaultValueController.php 500 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures;
  3. use Symfony\Component\Routing\Annotation\Route;
  4. class DefaultValueController
  5. {
  6. /**
  7. * @Route("/{default}/path", name="action")
  8. */
  9. public function action($default = 'value')
  10. {
  11. }
  12. /**
  13. * @Route("/hello/{name<\w+>}", name="hello_without_default")
  14. * @Route("/hello/{name<\w+>?Symfony}", name="hello_with_default")
  15. */
  16. public function hello(string $name = 'World')
  17. {
  18. }
  19. }