| Total Complexity | 19 |
| Total Lines | 233 |
| Duplicated Lines | 0 % |
| Coverage | 95.65% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Return instance with specific attributes |
||
| 15 | * @param array $attributes |
||
| 16 | * @return Route |
||
| 17 | */ |
||
| 18 | public function withAttributes(array $attributes): Route; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Returns route's attributes extracted from requested uri |
||
| 22 | * @return array |
||
| 23 | */ |
||
| 24 | public function getAttributes(): array; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Returns instance with specific controller |
||
| 28 | * @param $controller callable or Controller instance |
||
| 29 | * @return Route |
||
| 30 | */ |
||
| 31 | public function withController($controller): Route; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Should return callable that accepts psr-request and return psr-response instances or Controller instance. |
||
| 35 | * @see Controller |
||
| 36 | * @return callable |
||
| 37 | */ |
||
| 38 | public function getController(); |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Returns expression that is later matched against requested uri. |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function getPath(): string; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Returns route that can be matched against specified methods. |
||
| 48 | * @param array $methods |
||
| 49 | * @return Route |
||
| 50 | */ |
||
| 51 | public function withMethods(array $methods): Route; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Returns requested methods that are accepted by the route. |
||
| 55 | * @return array |
||
| 56 | */ |
||
| 57 | public function getMethods(): array; |
||
| 58 | } |
||
| 59 |