sunrise-php /
http-router
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * It's free open-source software released under the MIT License. |
||
| 5 | * |
||
| 6 | * @author Anatoly Nekhay <[email protected]> |
||
| 7 | * @copyright Copyright (c) 2018, Anatoly Nekhay |
||
| 8 | * @license https://github.com/sunrise-php/http-router/blob/master/LICENSE |
||
| 9 | * @link https://github.com/sunrise-php/http-router |
||
| 10 | */ |
||
| 11 | |||
| 12 | declare(strict_types=1); |
||
| 13 | |||
| 14 | namespace Sunrise\Http\Router; |
||
| 15 | |||
| 16 | use Sunrise\Coder\MediaTypeInterface; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @since 1.0.0 |
||
| 20 | */ |
||
| 21 | interface RouteInterface |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @since 2.0.0 |
||
| 25 | */ |
||
| 26 | public function getName(): string; |
||
| 27 | |||
| 28 | public function getPath(): string; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @since 2.0.0 |
||
| 32 | */ |
||
| 33 | public function getRequestHandler(): mixed; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return array<string, string> |
||
| 37 | * |
||
| 38 | * @since 3.0.0 |
||
| 39 | */ |
||
| 40 | public function getPatterns(): array; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return array<array-key, string> |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 44 | */ |
||
| 45 | public function getMethods(): array; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return array<string, mixed> |
||
| 49 | */ |
||
| 50 | public function getAttributes(): array; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @since 3.0.0 |
||
| 54 | */ |
||
| 55 | public function hasAttribute(string $name): bool; |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @since 3.0.0 |
||
| 59 | */ |
||
| 60 | public function getAttribute(string $name, mixed $default = null): mixed; |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param array<string, mixed> $attributes |
||
| 64 | * |
||
| 65 | * @since 2.0.0 |
||
| 66 | */ |
||
| 67 | public function withAddedAttributes(array $attributes): static; |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return array<array-key, mixed> |
||
|
0 ignored issues
–
show
|
|||
| 71 | * |
||
| 72 | * @since 2.0.0 |
||
| 73 | */ |
||
| 74 | public function getMiddlewares(): array; |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return array<array-key, MediaTypeInterface> |
||
|
0 ignored issues
–
show
|
|||
| 78 | * |
||
| 79 | * @since 3.0.0 |
||
| 80 | */ |
||
| 81 | public function getConsumedMediaTypes(): array; |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return array<array-key, MediaTypeInterface> |
||
|
0 ignored issues
–
show
|
|||
| 85 | * |
||
| 86 | * @since 3.0.0 |
||
| 87 | */ |
||
| 88 | public function getProducedMediaTypes(): array; |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @return array<array-key, string> |
||
|
0 ignored issues
–
show
|
|||
| 92 | * |
||
| 93 | * @since 2.4.0 |
||
| 94 | */ |
||
| 95 | public function getTags(): array; |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @since 2.4.0 |
||
| 99 | */ |
||
| 100 | public function getSummary(): string; |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @since 2.4.0 |
||
| 104 | */ |
||
| 105 | public function getDescription(): string; |
||
| 106 | |||
| 107 | /** |
||
| 108 | * @since 3.0.0 |
||
| 109 | */ |
||
| 110 | public function isDeprecated(): bool; |
||
| 111 | |||
| 112 | /** |
||
| 113 | * @since 3.0.0 |
||
| 114 | */ |
||
| 115 | public function isApiRoute(): bool; |
||
| 116 | |||
| 117 | /** |
||
| 118 | * @return non-empty-string|null |
||
|
0 ignored issues
–
show
|
|||
| 119 | * |
||
| 120 | * @since 3.0.0 |
||
| 121 | */ |
||
| 122 | public function getPattern(): ?string; |
||
| 123 | } |
||
| 124 |