1、更新内核
2、代码格式化
This commit is contained in:
@@ -36,18 +36,6 @@ class View extends Response
|
||||
->fetch($data, $this->vars, $this->replace);
|
||||
}
|
||||
|
||||
/**
|
||||
* 视图变量赋值
|
||||
* @access public
|
||||
* @param array $vars 模板变量
|
||||
* @return $this
|
||||
*/
|
||||
public function vars($vars = [])
|
||||
{
|
||||
$this->vars = $vars;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视图变量
|
||||
* @access public
|
||||
@@ -56,11 +44,11 @@ class View extends Response
|
||||
*/
|
||||
public function getVars($name = null)
|
||||
{
|
||||
if(is_null($name)){
|
||||
if (is_null($name)) {
|
||||
return $this->vars;
|
||||
}else{
|
||||
} else {
|
||||
return isset($this->vars[$name]) ? $this->vars[$name] : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user