Cml\Model::__call PHP Метод

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

当访问model中不存在的方法时直接调用$this->db()的相关方法
public __call ( $dbMethod, $arguments ) : Pdo
$dbMethod
$arguments
Результат Cml\Db\MySql\Pdo | \Cml\Db\MongoDB\MongoDB | $this
    public function __call($dbMethod, $arguments)
    {
        $res = call_user_func_array([$this->db($this->getDbConf()), $dbMethod], $arguments);
        if ($res instanceof Interfaces\Db) {
            return $this;
            //不是返回数据直接返回model实例
        } else {
            return $res;
        }
    }