RouterPath.php 862 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace EasySwoole\HttpAnnotation\Tests\TestController;
  3. use EasySwoole\HttpAnnotation\AnnotationController;
  4. use EasySwoole\HttpAnnotation\AnnotationTag\Api;
  5. use EasySwoole\HttpAnnotation\AnnotationTag\Controller;
  6. /**
  7. * Class RouterPath
  8. * @package EasySwoole\HttpAnnotation\Tests\TestController
  9. * @Controller(prefix="/Router")
  10. */
  11. class RouterPath extends AnnotationController
  12. {
  13. /**
  14. * @Api(name="test",path="/test")
  15. */
  16. public function test()
  17. {
  18. $this->response()->write(__CLASS__ . '::' . __FUNCTION__);
  19. }
  20. /**
  21. * @Api(name="test",path="/")
  22. */
  23. public function none()
  24. {
  25. $this->response()->write('none');
  26. }
  27. /**
  28. * @Api(name="ignorePrefix",path="/ignore",ignorePrefix=true)
  29. */
  30. public function ignore()
  31. {
  32. $this->response()->write('ignorePrefix');
  33. }
  34. }