mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 13:31:38 +08:00
PSR规范调整
This commit is contained in:
@@ -12,21 +12,24 @@
|
||||
namespace think;
|
||||
|
||||
// 内容解析类
|
||||
class Parser {
|
||||
class Parser
|
||||
{
|
||||
|
||||
static private $handler = [];
|
||||
private static $handler = [];
|
||||
|
||||
// 解析内容
|
||||
static public function parse($content,$type){
|
||||
if(!isset(self::$handler[$type])) {
|
||||
$class = '\\think\\parser\\driver\\'.strtolower($type);
|
||||
self::$handler[$type] = new $class();
|
||||
public static function parse($content, $type)
|
||||
{
|
||||
if (!isset(self::$handler[$type])) {
|
||||
$class = '\\think\\parser\\driver\\' . strtolower($type);
|
||||
self::$handler[$type] = new $class();
|
||||
}
|
||||
return self::$handler[$type]->parse($content);
|
||||
}
|
||||
|
||||
// 调用驱动类的方法
|
||||
static public function __callStatic($method, $params){
|
||||
return self::parse($params[0],$method);
|
||||
public static function __callStatic($method, $params)
|
||||
{
|
||||
return self::parse($params[0], $method);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user