| 1 | <?php |
||
| 8 | class Route |
||
| 9 | { |
||
| 10 | use MiddlewaresTrait; |
||
| 11 | |||
| 12 | /** @var string */ |
||
| 13 | protected $path; |
||
| 14 | /** @var callable */ |
||
| 15 | protected $endPoint; |
||
| 16 | /** @var array */ |
||
| 17 | protected $methods = []; |
||
| 18 | /** @var array */ |
||
| 19 | protected $restrictions = []; |
||
| 20 | /** @var array */ |
||
| 21 | protected $matches = []; |
||
| 22 | |||
| 23 | public function __construct(string $path, callable $handler) |
||
| 28 | |||
| 29 | public function __invoke(RequestInterface $request) |
||
| 37 | |||
| 38 | public function getEndPoint() : EndPoint |
||
| 42 | |||
| 43 | public function setRestrictions(array $restrictions) |
||
| 48 | |||
| 49 | public function getRestrictions() : array |
||
| 53 | |||
| 54 | public function getPath() : string |
||
| 58 | |||
| 59 | public function setMatches(array $values = []) |
||
| 64 | |||
| 65 | public function getMatches() : array |
||
| 69 | |||
| 70 | public function getMethods() : array |
||
| 74 | |||
| 75 | public function setMethods(array $methods) |
||
| 80 | } |
||
| 81 |