Cml\View\Base::getValue PHP Метод

getValue() публичный Метод

获取赋到模板的值
public getValue ( string $key = null ) : mixed
$key string 要获取的值的key,数组或字符串为数组时批量赋值
Результат mixed
    public function getValue($key = null)
    {
        if (is_null($key)) {
            //返回所有
            return $this->args;
        } elseif (isset($this->args[$key])) {
            return $this->args[$key];
        } else {
            return null;
        }
    }