Add Env.Request().

This commit is contained in:
Alexander Demidov
2013-06-21 12:27:46 +04:00
committed by Alexander Demidov
parent 5b9eab1067
commit 8133695eae

View File

@ -47,6 +47,14 @@ class Env
} }
return (isset($_POST[$key])) ? $_POST[$key] : $default; return (isset($_POST[$key])) ? $_POST[$key] : $default;
} }
static public function Request($key = null, $default = null)
{
if ($key === null) {
return $_REQUEST;
}
return (isset($_REQUEST[$key])) ? $_REQUEST[$key] : $default;
}
static public function Cookie($key = null, $default = false) static public function Cookie($key = null, $default = false)
{ {