\Widget

ThinkPHP Widget类 抽象类

Summary

Methods
Properties
Constants
render()
No public properties found
No constants found
renderFile()
checkCache()
$template
N/A
No private methods found
No private properties found
N/A

Properties

$template

$template : 

Type

Methods

render()

render(mixed  $data) : string

渲染输出 render方法是Widget唯一的接口 使用字符串返回 不能有任何输出

Parameters

mixed $data

要渲染的数据

Returns

string

renderFile()

renderFile(string  $templateFile = '', mixed  $var = '') : string

渲染模板输出 供render方法内部调用

Parameters

string $templateFile

模板文件

mixed $var

模板变量

Returns

string

checkCache()

checkCache(string  $tmplTemplateFile) : \boolen

检查缓存文件是否有效 如果无效则需要重新编译

Parameters

string $tmplTemplateFile

模板文件名

Returns

\boolen