PHP Class think\view\driver\Think

Mostra file Open project: top-think/framework

Protected Properties

Property Type Description
$config 模板引擎参数

Public Methods

Method Description
__call ( $method, $params )
__construct ( $config = [] )
config ( string | array $name, mixed $value = null ) : mixed 配置或者获取模板引擎参数
display ( string $template, array $data = [], array $config = [] ) : void 渲染模板内容
exists ( string $template ) : boolean 检测是否存在模板文件
fetch ( string $template, array $data = [], array $config = [] ) : void 渲染模板文件

Private Methods

Method Description
parseTemplate ( string $template ) : string 自动定位模板文件

Method Details

__call() public method

public __call ( $method, $params )

__construct() public method

public __construct ( $config = [] )

config() public method

配置或者获取模板引擎参数
public config ( string | array $name, mixed $value = null ) : mixed
$name string | array 参数名
$value mixed 参数值
return mixed

display() public method

渲染模板内容
public display ( string $template, array $data = [], array $config = [] ) : void
$template string 模板内容
$data array 模板变量
$config array 模板参数
return void

exists() public method

检测是否存在模板文件
public exists ( string $template ) : boolean
$template string 模板文件或者模板规则
return boolean

fetch() public method

渲染模板文件
public fetch ( string $template, array $data = [], array $config = [] ) : void
$template string 模板文件
$data array 模板变量
$config array 模板参数
return void

Property Details

$config protected_oe property

模板引擎参数
protected $config