private function __construct() { self::$_method = strtoupper($_SERVER['REQUEST_METHOD']); self::$GET = $_GET; self::$POST = $_POST; self::$SERVER = $_SERVER; self::$REQUEST = $_REQUEST; self::$FILES = $_FILES; self::$_args["GET"] = self::$GET; self::$_args["POST"] = self::$POST; //$headers = apache_request_headers(); foreach ($_SERVER as $i => $val) { $name = str_replace(array('HTTP_', '_'), array('', '-'), $i); self::$_headers[strtolower($name)] = $val; } }
public static function setMethod($method) { self::$_method = strtolower($method); }