app = $app; $this->method = $_SERVER["REQUEST_METHOD"]; $this->url = $_SERVER["REQUEST_URI"]; $this->remoteHost = $_SERVER["REMOTE_ADDR"]; $this->hostName = $_SERVER["HTTP_HOST"]; } /** * Returns the URL of the current HTTP request */ public function GetURL() { return $this->url; } public function SetURL($value) { $this->url = $value; } /** * Returns the domain name of the current HTTP request */ public function GetDomain() { return $this->hostName; } /** * Returns the remote host of the current HTTP request */ public function GetRemoteHost() { return $this->remoteHost; } /** * Returns the HTTP method of the current request; */ public function GetMethod() { return $this->method; } /** * Returns the value of the HTTP request parameter */ public function GetParameter($paramName) { if ($this->GetMethod() == "POST") { return $_POST[$paramName]; } else if ($this->GetMethod() == "GET") { return $_GET[$paramName]; } else { return null; } } public function HasParameter($paramName) { if ($this->GetMethod() == "POST") { return isset($_POST[$paramName]); } else if ($this->GetMethod() == "GET") { return isset($_GET[$paramName]); } else { return false; } } public function GetParameters() { if ($this->GetMethod() == "POST") { return $_POST; } else if ($this->GetMethod() == "GET") { return $_GET; } else { return null; } } public function Application() { return $this->app; } /* * return all items in post */ public function ReturnPost() { if($this->GetMethod() == "POST") return $_POST; } /* * return all items in get */ public function ReturnGet() { if($this->GetMethod() == "GET") return $_GET; } } ?>