public function __call($method, $parameters) { $result = call_user_func_array(array($this->query, $method), $parameters); if ($result === $this->query) { return $this; } return $result; }