diff --git a/Think/Parser.php b/Think/Parser.php new file mode 100644 index 00000000..938a79d9 --- /dev/null +++ b/Think/Parser.php @@ -0,0 +1,28 @@ + +// +---------------------------------------------------------------------- +// $Id$ + +namespace Think; +// 内容解析类 +class Parser { + protected $handler = null; + public function __construct($content,$type){ + $class = '\Think\Parser\Driver\\'.ucwords($type); + $parse = new $class(); + return $parse->parse($content); + } + + // 解析内容 + static public function parse($content,$type){ + return new static($content,$type); + } + +} \ No newline at end of file