PHP Class ParseTagModel, thinksns

Author: Stream
Show file Open project: medz/thinksns-4 Class Usage Examples

Public Methods

Method Description
__construct ( ) +---------------------------------------------------------- 架构函数 +----------------------------------------------------------
getSign ( $tagName )
getTagInfo ( unknown_type $sign ) 查找模块在数据库中是否存在
getTplContent ( $tpl, $tagName, $sign )
init ( ) 服务初始化
parse ( $content, $replace = true, $scope = false ) 解析并得到替换后的内容 解析整个字符串中的标签 用于预览功能
parseId ( unknown_type $content, unknown_type $cacheOpen = true ) : mixed 解析已有的模块
pregReplace ( $tag, $replace = true ) 直接解析某一个标签
run ( ) 运行服务,系统服务自动运行
setContent ( $content, $sign )

Private Methods

Method Description
parseTagAttr ( $attr )
parseTagContent ( unknown_type $source ) 编译并返回内容
pregReplaceTag ( unknown_type $tagName, unknown_type $path, unknown_type $content, unknown_type $replace = true ) : mixed 匹配内容并 编译返回HTMl内容
traversalDir ( $path )

Method Details

__construct() public method

+---------------------------------------------------------- 架构函数 +----------------------------------------------------------
Author: melec制作 +----------------------------------------------------------
public __construct ( )

getSign() public method

public getSign ( $tagName )

getTagInfo() public method

查找模块在数据库中是否存在
public getTagInfo ( unknown_type $sign )
$sign unknown_type

getTplContent() public method

public getTplContent ( $tpl, $tagName, $sign )

init() public method

服务初始化
public init ( )

parse() public method

解析并得到替换后的内容 解析整个字符串中的标签 用于预览功能
public parse ( $content, $replace = true, $scope = false )
$content string

parseId() public method

解析已有的模块
public parseId ( unknown_type $content, unknown_type $cacheOpen = true ) : mixed
$content unknown_type
$cacheOpen unknown_type
return mixed

pregReplace() public method

直接解析某一个标签
public pregReplace ( $tag, $replace = true )

run() public method

运行服务,系统服务自动运行
public run ( )

setContent() public method

public setContent ( $content, $sign )