Exemple #1
0
 public function quit($checkResult = false)
 {
     $this->Log->debug(__METHOD__, sprintf('system running use time %fs,RAM %s', Common::click(), Common::convertUnit(Common::RAMClick())));
     $resultMsg = $this->resultMsg;
     if (self::$init !== null && self::$quit === null) {
         self::$quit = true;
         spl_autoload_unregister(array($this, 'autoLoad'));
         // 开启debug时将系统debug信息写入log
         if (Common::getConfig('debug_level', $this->config)) {
             $this->Log->writeLog();
         }
         // 清理Model所占资源
         if (is_object($this->Model)) {
             $this->Model->quit();
         }
         // 注销register_shutdown_function,避免影响其他程序
         $this->registerShutdown->unRegister();
     }
 }