$v) { $cleanValues[$k] = Qs_Request::_recursiveFilter($filter, $v); } return $cleanValues; } else { return call_user_func($filter, $value); } } public static function getPostValue($name, $default = null) { return Qs_Request::_getValue($_POST, $name, true, $default); } public static function getGetValue($name, $default = null) { return Qs_Request::_getValue($_GET, $name, true, $default); } public static function getRequestValue($name, $default = null) { return Qs_Request::_getValue($_REQUEST, $name, true, $default); } public static function getCookieValue($name, $default = null) { return Qs_Request::_getValue($_COOKIE, $name, false, $default); } public static function getHeader($header) { if (empty($header)) { return false; } // Try to get it from the $_SERVER array first $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header)); if (!empty($_SERVER[$temp])) { return $_SERVER[$temp]; } // This seems to be the only way to get the Authorization header on // Apache if (function_exists('apache_request_headers')) { $headers = apache_request_headers(); if (!empty($headers[$header])) { return $headers[$header]; } } return false; } public static function isXmlHttpRequest() { return (Qs_Request::getHeader('X_REQUESTED_WITH') == 'XMLHttpRequest'); } public static function getPost() { $post = $_POST; if (1 == get_magic_quotes_gpc()) { $post = Qs_Request::_recursiveFilter('stripslashes', $post); } return $post; } }