PHP 클래스 think\template\TagLib

저자: liu21st ([email protected])
파일 보기 프로젝트 열기: top-think/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$comparison
$parse array 标签库分析数组
$tagLib string 标签库名称
$tagList array 标签库标签列表
$tags
$tpl object 当前模板对象
$valid boolean 标签库是否有效
$xml string 标签库定义XML文件

공개 메소드들

메소드 설명
__construct ( stdClass $template ) 架构函数
autoBuildVar ( string &$name ) : string 自动识别构建变量
getTags ( ) 获取标签定义
parseAttr ( string $str, string $name, string $alias = '' ) : array 分析标签属性 正则方式
parseCondition ( string $condition ) : string 解析条件表达式
parseTag ( string &$content, string $lib = '' ) : void 按签标库替换页面中的标签

비공개 메소드들

메소드 설명
getRegex ( array | string $tags, boolean $close ) : string 按标签生成正则

메소드 상세

__construct() 공개 메소드

架构函数
public __construct ( stdClass $template )
$template stdClass 模板引擎对象

autoBuildVar() 공개 메소드

自动识别构建变量
public autoBuildVar ( string &$name ) : string
$name string 变量描述
리턴 string

getTags() 공개 메소드

获取标签定义
public getTags ( )

parseAttr() 공개 메소드

分析标签属性 正则方式
public parseAttr ( string $str, string $name, string $alias = '' ) : array
$str string 标签属性字符串
$name string 标签名
$alias string 别名
리턴 array

parseCondition() 공개 메소드

解析条件表达式
public parseCondition ( string $condition ) : string
$condition string 表达式标签内容
리턴 string

parseTag() 공개 메소드

按签标库替换页面中的标签
public parseTag ( string &$content, string $lib = '' ) : void
$content string 模板内容
$lib string 标签库名
리턴 void

프로퍼티 상세

$comparison 보호되어 있는 프로퍼티

protected $comparison

$parse 보호되어 있는 프로퍼티

标签库分析数组
protected array $parse
리턴 array

$tagLib 보호되어 있는 프로퍼티

标签库名称
protected string $tagLib
리턴 string

$tagList 보호되어 있는 프로퍼티

标签库标签列表
protected array $tagList
리턴 array

$tags 보호되어 있는 프로퍼티

protected $tags

$tpl 보호되어 있는 프로퍼티

当前模板对象
protected object $tpl
리턴 object

$valid 보호되어 있는 프로퍼티

标签库是否有效
protected bool $valid
리턴 boolean

$xml 보호되어 있는 프로퍼티

标签库定义XML文件
protected string $xml
리턴 string