1 | <?php |
||
24 | class RouterResponse implements RouterResponseInterface |
||
25 | { |
||
26 | /** |
||
27 | * @var int Response Status Code. |
||
28 | */ |
||
29 | protected $statusCode; |
||
30 | |||
31 | /** |
||
32 | * @var string|\Closure Route Handler. |
||
33 | */ |
||
34 | protected $handler; |
||
35 | |||
36 | /** |
||
37 | * @var array Route Query Params. |
||
38 | */ |
||
39 | protected $vars = []; |
||
40 | |||
41 | /** |
||
42 | * @var array Route Names |
||
43 | */ |
||
44 | protected $names = []; |
||
45 | |||
46 | /** |
||
47 | * Router Response constructor. |
||
48 | * |
||
49 | * @param int $statusCode |
||
50 | * @param string|\Closure $handler |
||
51 | * @param array $names |
||
52 | * @param array $vars |
||
53 | */ |
||
54 | 4 | public function __construct( |
|
66 | |||
67 | /** |
||
68 | * @inheritdoc |
||
69 | */ |
||
70 | 1 | public function getHandler() |
|
74 | |||
75 | /** |
||
76 | * @inheritdoc |
||
77 | */ |
||
78 | 1 | public function getStatusCode() |
|
82 | |||
83 | /** |
||
84 | * @inheritdoc |
||
85 | */ |
||
86 | 1 | public function getVars() |
|
90 | |||
91 | /** |
||
92 | * @inheritdoc |
||
93 | */ |
||
94 | 1 | public function getNames() |
|
98 | |||
99 | /** |
||
100 | * @param string $handler |
||
101 | * @return RouterResponse |
||
102 | */ |
||
103 | public function withHandler(string $handler){ |
||
108 | |||
109 | /** |
||
110 | * @param array $vars |
||
111 | * @return RouterResponse |
||
112 | */ |
||
113 | public function withVars(array $vars){ |
||
118 | |||
119 | /** |
||
120 | * @param int $code |
||
121 | * @return RouterResponse |
||
122 | */ |
||
123 | public function withStatusCode(int $code){ |
||
128 | |||
129 | /** |
||
130 | * @param array $names |
||
131 | * @return RouterResponse |
||
132 | */ |
||
133 | public function withNames(array $names){ |
||
138 | } |
||
139 |