1 | <?php |
||
7 | class RoutePattern |
||
8 | { |
||
9 | /** |
||
10 | * @var string|array |
||
11 | */ |
||
12 | protected $method; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $pattern; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $handler; |
||
23 | |||
24 | /** |
||
25 | * RoutePattern constructor. |
||
26 | * |
||
27 | * @param array|string $method |
||
28 | * @param string $pattern |
||
29 | * @param string $handler |
||
30 | */ |
||
31 | public function __construct($method, $pattern, $handler = null) |
||
41 | |||
42 | /** |
||
43 | * @return array|string |
||
44 | */ |
||
45 | public function getMethod() |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getPattern() |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getHandler() |
||
65 | |||
66 | /** |
||
67 | * @param array|string $method |
||
68 | */ |
||
69 | public function setMethod($method) |
||
73 | |||
74 | /** |
||
75 | * @param string $pattern |
||
76 | */ |
||
77 | public function setPattern($pattern) |
||
81 | |||
82 | /** |
||
83 | * @param string $handler |
||
84 | */ |
||
85 | public function setHandler($handler) |
||
89 | } |
||
90 |