1 | <?php |
||
10 | class Request |
||
11 | { |
||
12 | /** |
||
13 | * Gets/returns the value of a specific key of the POST super-global. |
||
14 | * When using just Request::post('x') it will return the raw and untouched $_POST['x'], when using it like |
||
15 | * Request::post('x', true) then it will return a trimmed and stripped $_POST['x'] ! |
||
16 | * |
||
17 | * @param mixed $key key |
||
18 | * @param bool $clean marker for optional cleaning of the var |
||
19 | * @return mixed the key's value or nothing |
||
20 | */ |
||
21 | public static function post($key, $clean = false) |
||
29 | |||
30 | /** |
||
31 | * Returns the state of a checkbox. |
||
32 | * |
||
33 | * @param mixed $key key |
||
34 | * @return mixed state of the checkbox |
||
35 | */ |
||
36 | public static function postCheckbox($key) |
||
40 | |||
41 | /** |
||
42 | * gets/returns the value of a specific key of the GET super-global |
||
43 | * @param mixed $key key |
||
44 | * @return mixed the key's value or nothing |
||
45 | */ |
||
46 | public static function get($key) |
||
52 | |||
53 | /** |
||
54 | * gets/returns the value of a specific key of the COOKIE super-global |
||
55 | * @param mixed $key key |
||
56 | * @return mixed the key's value or nothing |
||
57 | */ |
||
58 | public static function cookie($key) |
||
64 | } |
||
65 |