mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
优化Connection类__call方法
This commit is contained in:
@@ -155,11 +155,8 @@ abstract class Connection
|
|||||||
*/
|
*/
|
||||||
public function __call($method, $args)
|
public function __call($method, $args)
|
||||||
{
|
{
|
||||||
if (!isset($this->query['database'])) {
|
$query = $this->model('datebase');
|
||||||
$class = $this->config['query'];
|
return call_user_func_array([$query, $method], $args);
|
||||||
$this->query['database'] = new $class($this);
|
|
||||||
}
|
|
||||||
return call_user_func_array([$this->query['database'], $method], $args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user