Example #1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->prepare();
     $this->setPost($_POST);
     $this->setGet($_GET);
     $this->setFile($_FILES);
     $this->setScriptFile($_SERVER['SCRIPT_NAME'])->setServer($_SERVER['SERVER_NAME'])->setMethod($_SERVER['REQUEST_METHOD'])->setProtocol($_SERVER['SERVER_PROTOCOL'])->setPort($_SERVER['SERVER_PORT'])->setIp($_SERVER['REMOTE_ADDR']);
     if (isset($_SERVER['REQUEST_URI'])) {
         $this->setUri($_SERVER['REQUEST_URI']);
     } else {
         $this->setUri($_SERVER['PHP_SELF']);
     }
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
         $this->setAjax(strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
     }
     return $this;
 }