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