From f0c915b3db098b4de1efb8d805cd0ee14c293d9f Mon Sep 17 00:00:00 2001 From: huangdijia Date: Tue, 8 Dec 2015 10:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20Parser=E7=9A=84=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=20=E8=A7=84=E8=8C=83=20Slog=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E7=A0=81=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/org/parser.php | 4 ++-- library/think/db/driver.php | 2 +- library/think/slog.php | 2 +- mode/common.php | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/library/org/parser.php b/library/org/parser.php index 0928137b..aa7831ae 100644 --- a/library/org/parser.php +++ b/library/org/parser.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -namespace think; +namespace org; // 内容解析类 class Parser @@ -24,7 +24,7 @@ class Parser public static function parse($content, $type) { if (!isset(self::$handler[$type])) { - $class = '\\think\\parser\\driver\\' . strtolower($type); + $class = '\\org\\parser\\driver\\' . strtolower($type); self::$handler[$type] = new $class(); } return self::$handler[$type]->parse($content); diff --git a/library/think/db/driver.php b/library/think/db/driver.php index 8986e521..5a3a1c27 100644 --- a/library/think/db/driver.php +++ b/library/think/db/driver.php @@ -17,7 +17,7 @@ use think\Debug; use think\Exception; use think\Lang; use think\Log; -use think\slog; +use think\Slog; abstract class Driver { diff --git a/library/think/slog.php b/library/think/slog.php index 84e2bbdb..5d9dc1da 100644 --- a/library/think/slog.php +++ b/library/think/slog.php @@ -4,7 +4,7 @@ * @author luofei614 */ namespace think; -class slog +class Slog { public static $start_time=0; public static $start_memory=0; diff --git a/mode/common.php b/mode/common.php index 6ce4fa82..64e32015 100644 --- a/mode/common.php +++ b/mode/common.php @@ -42,9 +42,8 @@ return [ 'think\Url' => CORE_PATH . 'url' . EXT, 'think\Debug' => CORE_PATH . 'debug' . EXT, 'think\Input' => CORE_PATH . 'input' . EXT, - 'think\Parser' => CORE_PATH . 'parser' . EXT, 'think\Lang' => CORE_PATH . 'lang' . EXT, - 'think\slog' => CORE_PATH . 'slog' . EXT + 'think\Slog' => CORE_PATH . 'slog' . EXT ], 'init' => [],