PHP Class Cml\View\Base

Inheritance: implements Cml\Interfaces\View
Show file Open project: linhecheng/cmlphp

Protected Properties

Property Type Description
$args array 要传到模板的数据

Public Methods

Method Description
assign ( string | array $key, mixed $val = null ) 变量赋值
assignByRef ( string | array $key, mixed &$val = null ) 引用赋值
getValue ( string $key = null ) : mixed 获取赋到模板的值

Method Details

assign() public method

变量赋值
public assign ( string | array $key, mixed $val = null )
$key string | array
$val mixed 赋值到模板的值

assignByRef() public method

引用赋值
public assignByRef ( string | array $key, mixed &$val = null )
$key string | array
$val mixed

getValue() public method

获取赋到模板的值
public getValue ( string $key = null ) : mixed
$key string 要获取的值的key,数组或字符串为数组时批量赋值
return mixed

Property Details

$args protected property

要传到模板的数据
protected array $args
return array