示例#1
0
文件: Http.php 项目: kevinwan/xf
 /**
  * 获取当前实例
  * @return XF_Controller_Request_Http
  */
 public static function getInstance()
 {
     if (self::$_instance === null) {
         self::$_instance = new self();
         if (self::$_instance->isPost() && is_array($_POST)) {
             foreach ($_POST as $key => $val) {
                 self::$_instance->setPost($key, $val);
             }
             //unset($_POST);
         }
         if (is_array($_FILES)) {
             foreach ($_FILES as $key => $val) {
                 self::$_instance->setPost($key, $val, false);
             }
         }
         //unset($_GET);
     }
     return self::$_instance;
 }