MustacheRenderer
扩展自 AbstractRenderer用于渲染输出的 Mustache 类。
| 自版本 |
2.0.0 |
|---|---|
| 包 |
Joomla 框架 |
方法
__construct
构造函数
__construct(\Mustache_Engine renderer = null) :
| 自版本 |
2.0.0 |
|---|
参数
- 渲染器
Mustache_Engine|null渲染引擎
返回值
混合类型
getRenderer
获取渲染引擎
getRenderer() : \Mustache_Engine
| 自版本 |
2.0.0 |
|---|
返回值
Mustache_Engine
pathExists
检查文件夹、文件夹别名、模板或模板路径是否存在
pathExists( path) :
| 自版本 |
2.0.0 |
|---|
参数
- 路径
string完整路径或路径的一部分
返回值
bool如果路径存在则为 True
render
渲染并返回编译后的数据。
render( template, mixed||string|int data = []) :
| 自版本 |
2.0.0 |
|---|
参数
- 模板
string模板文件名- 数据
array<string|int, mixed>传递给模板的数据
返回值
string编译后的数据
set
设置一部分数据
set( key, value) :
继承
| 自版本 |
2.0.0 |
|---|
参数
- 键
string变量名称- 值
string变量的值
返回值
$this
setData
将数据从数组加载到渲染器中
setData(mixed||string|int data) :
继承
| 自版本 |
2.0.0 |
|---|
参数
- 数据
array<string|int, mixed>变量数组
返回值
$this
unsetData
从渲染器中卸载数据
unsetData() :
继承
| 自版本 |
2.0.0 |
|---|
返回值
$this
属性
数据
渲染器输出的数据
继承
| 自版本 |
2.0.0 |
|---|
类型
array<string|int, mixed>
渲染器
渲染引擎
| 自版本 |
2.0.0 |
|---|
类型
Mustache_Engine