1 | <?php |
||
10 | class ServerRequest extends Request |
||
11 | { |
||
12 | /** |
||
13 | * @var ServerRequestInterface |
||
14 | */ |
||
15 | protected $message; |
||
16 | |||
17 | /** |
||
18 | * Constructor. |
||
19 | * |
||
20 | * @param ServerRequestInterface $message |
||
21 | * @param AbstractAssert|null $previous |
||
22 | */ |
||
23 | public function __construct(ServerRequestInterface $message, Utils\AbstractAssert $previous = null) |
||
27 | |||
28 | /** |
||
29 | * Check if the server params contains a key. |
||
30 | * |
||
31 | * @param string $key |
||
32 | * @param string $message |
||
33 | * |
||
34 | * @return self |
||
35 | */ |
||
36 | public function hasServerParam($key, $message = '') |
||
40 | |||
41 | /** |
||
42 | * Asserts a server param. |
||
43 | * |
||
44 | * @param string $key |
||
45 | * @param string $value |
||
46 | * @param string $message |
||
47 | * |
||
48 | * @return self |
||
49 | */ |
||
50 | public function serverParam($key, $value, $message = '') |
||
54 | |||
55 | /** |
||
56 | * Check if the cookie params contains a key. |
||
57 | * |
||
58 | * @param string $key |
||
59 | * @param string $message |
||
60 | * |
||
61 | * @return self |
||
62 | */ |
||
63 | public function hasCookieParam($key, $message = '') |
||
67 | |||
68 | /** |
||
69 | * Asserts a cookie param. |
||
70 | * |
||
71 | * @param string $key |
||
72 | * @param string $value |
||
73 | * @param string $message |
||
74 | * |
||
75 | * @return self |
||
76 | */ |
||
77 | public function cookieParam($key, $value, $message = '') |
||
81 | |||
82 | /** |
||
83 | * Check if the query params contains a key. |
||
84 | * |
||
85 | * @param string $key |
||
86 | * @param string $message |
||
87 | * |
||
88 | * @return self |
||
89 | */ |
||
90 | public function hasQueryParam($key, $message = '') |
||
94 | |||
95 | /** |
||
96 | * Asserts a query param. |
||
97 | * |
||
98 | * @param string $key |
||
99 | * @param string $value |
||
100 | * @param string $message |
||
101 | * |
||
102 | * @return self |
||
103 | */ |
||
104 | public function queryParam($key, $value, $message = '') |
||
108 | |||
109 | /** |
||
110 | * Check if the uploadedFiles contains a key. |
||
111 | * |
||
112 | * @param string $key |
||
113 | * @param string $message |
||
114 | * |
||
115 | * @return self |
||
116 | */ |
||
117 | public function hasUploadedFile($key, $message = '') |
||
121 | |||
122 | /** |
||
123 | * Check if the parsedBody params contains a key. |
||
124 | * |
||
125 | * @param string $key |
||
126 | * @param string $message |
||
127 | * |
||
128 | * @return self |
||
129 | */ |
||
130 | public function hasParsedBody($key, $message = '') |
||
134 | |||
135 | /** |
||
136 | * Asserts a parsedBody param. |
||
137 | * |
||
138 | * @param string $key |
||
139 | * @param string $value |
||
140 | * @param string $message |
||
141 | * |
||
142 | * @return self |
||
143 | */ |
||
144 | public function parsedBody($key, $value, $message = '') |
||
148 | |||
149 | /** |
||
150 | * Check if the attributes contains a key. |
||
151 | * |
||
152 | * @param string $key |
||
153 | * @param string $message |
||
154 | * |
||
155 | * @return self |
||
156 | */ |
||
157 | public function hasAttribute($key, $message = '') |
||
161 | |||
162 | /** |
||
163 | * Asserts an attribute. |
||
164 | * |
||
165 | * @param string $key |
||
166 | * @param string $value |
||
167 | * @param string $message |
||
168 | * |
||
169 | * @return self |
||
170 | */ |
||
171 | public function attribute($key, $value, $message = '') |
||
175 | } |
||
176 |