Skip to content

Commit 4ede584

Browse files
committed
✨ add index() method
Signed-off-by: otengkwame <[email protected]>
1 parent 51f8d9a commit 4ede584

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CodeIgniter/Framework/core/Input.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,24 @@ public function has($index = null, $xss_clean = false)
284284
return false;
285285
}
286286

287+
// --------------------------------------------------------------------
288+
289+
/**
290+
* Fetch an item from the REQUEST array
291+
*
292+
* @param mixed $index
293+
* @param bool $xss_clean
294+
* @return mixed
295+
*/
296+
protected function index($index = null, $xss_clean = false)
297+
{
298+
$array = $_REQUEST;
299+
300+
return $this->_fetch_from_array($array, $index, $xss_clean);
301+
}
302+
303+
// --------------------------------------------------------------------
304+
287305
/**
288306
* Fetch only items from the REQUEST array
289307
*

0 commit comments

Comments
 (0)