1: <?php
2: /**
3: * Created by PhpStorm.
4: * @Author: Shakti Phartiyal
5: * Date: 12/22/16
6: * Time: 12:51 PM
7: */
8: namespace Core\Input;
9: use Core\System\System;
10:
11: class Input
12: {
13: /**
14: * Checks if a User request has a particular variable in request parameters
15: * @param $input
16: * @return bool
17: */
18: public static function has($input)
19: {
20: return isset($_REQUEST[$input])?true:false;
21: }
22:
23: /**
24: * Returns the user request data
25: * @param null $input
26: * @return array|mixed
27: */
28: public static function get($input=null)
29: {
30: if($input == null)
31: {
32: return System::FilterInput($_REQUEST);
33: }
34: else
35: {
36: return System::FilterInput($_REQUEST[$input]);
37: }
38: }
39: }