改进App类和Request类

This commit is contained in:
thinkphp
2016-06-24 23:41:02 +08:00
parent c4ef774882
commit 7f13d70d0b
3 changed files with 29 additions and 15 deletions

View File

@@ -1296,15 +1296,13 @@ class Request
/**
* 设置或者获取当前请求的调度信息
* @access public
* @param array|string $dispatch 调度信息
* @param string $type 调度类型
* @param array $params 参数
* @param array $dispatch 调度信息
* @return array
*/
public function dispatch($dispatch = null, $type = 'module', $params = [])
public function dispatch($dispatch = null)
{
if (!is_null($dispatch)) {
$this->dispatch = ['type' => $type, $type => $dispatch, 'params' => $params];
$this->dispatch = $dispatch;
}
return $this->dispatch;
}