think\Template::parseTagLib PHP Method

parseTagLib() public method

TagLib库解析
public parseTagLib ( string $tagLib, string &$content, boolean $hide = false ) : void
$tagLib string 要解析的标签库
$content string 要解析的模板内容
$hide boolean 是否隐藏标签库前缀
return void
    public function parseTagLib($tagLib, &$content, $hide = false)
    {
        if (false !== strpos($tagLib, '\\')) {
            // 支持指定标签库的命名空间
            $className = $tagLib;
            $tagLib = substr($tagLib, strrpos($tagLib, '\\') + 1);
        } else {
            $className = '\\think\\template\\taglib\\' . ucwords($tagLib);
        }
        $tLib = new $className($this);
        $tLib->parseTag($content, $hide ? '' : $tagLib);
        return;
    }