From 8133695eae212edeb087a134a968a5fd325495db Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Fri, 21 Jun 2013 12:27:46 +0400 Subject: [PATCH] Add Env.Request(). --- classes/Env.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/classes/Env.class.php b/classes/Env.class.php index 1b04117..2adb9f6 100644 --- a/classes/Env.class.php +++ b/classes/Env.class.php @@ -47,6 +47,14 @@ class Env } 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) {