Dispatcher.php 594 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace FastRoute;
  3. interface Dispatcher
  4. {
  5. const NOT_FOUND = 0;
  6. const FOUND = 1;
  7. const METHOD_NOT_ALLOWED = 2;
  8. /**
  9. * Dispatches against the provided HTTP method verb and URI.
  10. *
  11. * Returns array with one of the following formats:
  12. *
  13. * [self::NOT_FOUND]
  14. * [self::METHOD_NOT_ALLOWED, ['GET', 'OTHER_ALLOWED_METHODS']]
  15. * [self::FOUND, $handler, ['varName' => 'value', ...]]
  16. *
  17. * @param string $httpMethod
  18. * @param string $uri
  19. *
  20. * @return array
  21. */
  22. public function dispatch($httpMethod, $uri);
  23. }