public function __call($method, $args) { if (!isset($this->query['database'])) { $class = $this->config['query']; $this->query['database'] = new $class($this); } return call_user_func_array([$this->query['database'], $method], $args); }