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