Cml\Debug::stop PHP Метод

stop() публичный статический Метод

程序执行完毕,打印CmlPHP运行信息
public static stop ( )
    public static function stop()
    {
        self::$stopTime = microtime(true);
        // 记录内存结束使用
        function_exists('memory_get_usage') && (self::$stopMemory = memory_get_usage());
        Cml::getContainer()->make('cml_debug')->stopAndShowDebugInfo();
        CML_OB_START && ob_end_flush();
    }

Usage Example

Пример #1
0
 /**
  * 程序中并输出调试信息
  *
  */
 public static function cmlStop()
 {
     Plugin::hook('cml.before_cml_stop');
     //输出Debug模式的信息
     if ($GLOBALS['debug']) {
         header('Content-Type:text/html; charset=' . Config::get('default_charset'));
         Debug::stop();
     } else {
         $deBugLogData = dump('', 1);
         if (!empty($deBugLogData)) {
             require CML_PATH . DIRECTORY_SEPARATOR . 'Cml' . DIRECTORY_SEPARATOR . 'ConsoleLog.php';
         }
         CML_OB_START && ob_end_flush();
         exit;
     }
 }
All Usage Examples Of Cml\Debug::stop