mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Request类的dispatch方法
This commit is contained in:
@@ -1296,13 +1296,16 @@ class Request
|
|||||||
/**
|
/**
|
||||||
* 获取当前请求的调度信息
|
* 获取当前请求的调度信息
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $dispatch 调度信息
|
* @param array|string $dispatch 调度信息
|
||||||
|
* @param string $type 调度类型
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function dispatch($dispatch = [])
|
public function dispatch($dispatch = null, $type = null, $params = [])
|
||||||
{
|
{
|
||||||
if (!empty($dispatch)) {
|
if (!is_null($dispatch)) {
|
||||||
$this->dispatch = $dispatch;
|
$this->dispatch = is_array($dispatch) ?
|
||||||
|
$dispatch :
|
||||||
|
['type' => $type, $type => $dispatch, 'params' => $param];
|
||||||
}
|
}
|
||||||
return $this->dispatch;
|
return $this->dispatch;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user