/** * Returns a value from the $_REQUEST array. * * You have to specify the index of the $_REQUEST-array. The second parameter * is the type of the variable. Default is VAR_NONE. You can specify thw * following constants: VAR_NONE, VAR_DB, VAR_INT, VAR_ALNUM, VAR_ARR_NONE, * VAR_ARR_STR, VAR_ARR_INT, VAR_ARR_ALNUM, VAR_HTML, VAR_ARR_HTML. * With the third parameter you can specify a default value, which will be set * when the $_REQUEST-array does not contain an entry with the specified index. * * @param string Index * @param int Type of variable * @param mixed Default value * @return mixed Value for specified index * @static **/ public static function get($index, $type = VAR_NONE, $standard = null) { $value = null; if (is_int($index)) { $value = Request::getObject()->getArg($index); } else { if (isset($_REQUEST[$index])) { $value = $_REQUEST[$index]; } } return Sanitize::save($value, $type, $standard); }