@@ -214,4 +214,70 @@ public function isCLI(): bool
214214 {
215215 return true ;
216216 }
217+
218+ /**
219+ * Fetch an item from GET data.
220+ *
221+ * @param array|string|null $index Index for item to fetch from $_GET.
222+ * @param int|null $filter A filter name to apply.
223+ * @param mixed|null $flags
224+ *
225+ * @return null
226+ */
227+ public function getGet ($ index = null , $ filter = null , $ flags = null )
228+ {
229+ return $ this ->returnNullOrEmptyArray ($ index );
230+ }
231+
232+ /**
233+ * Fetch an item from POST.
234+ *
235+ * @param array|string|null $index Index for item to fetch from $_POST.
236+ * @param int|null $filter A filter name to apply
237+ * @param mixed $flags
238+ *
239+ * @return null
240+ */
241+ public function getPost ($ index = null , $ filter = null , $ flags = null )
242+ {
243+ return $ this ->returnNullOrEmptyArray ($ index );
244+ }
245+
246+ /**
247+ * Fetch an item from POST data with fallback to GET.
248+ *
249+ * @param array|string|null $index Index for item to fetch from $_POST or $_GET
250+ * @param int|null $filter A filter name to apply
251+ * @param mixed $flags
252+ *
253+ * @return null
254+ */
255+ public function getPostGet ($ index = null , $ filter = null , $ flags = null )
256+ {
257+ return $ this ->returnNullOrEmptyArray ($ index );
258+ }
259+
260+ /**
261+ * Fetch an item from GET data with fallback to POST.
262+ *
263+ * @param array|string|null $index Index for item to be fetched from $_GET or $_POST
264+ * @param int|null $filter A filter name to apply
265+ * @param mixed $flags
266+ *
267+ * @return null
268+ */
269+ public function getGetPost ($ index = null , $ filter = null , $ flags = null )
270+ {
271+ return $ this ->returnNullOrEmptyArray ($ index );
272+ }
273+
274+ /**
275+ * @param array|string|null $index
276+ *
277+ * @return array|null
278+ */
279+ private function returnNullOrEmptyArray ($ index )
280+ {
281+ return ($ index === null || is_array ($ index )) ? [] : null ;
282+ }
217283}
0 commit comments