/** * Return the SQL query string. * * @return string */ public function __toString() { try { // Return the SQL string return $this->compile(Database::instance()); } catch (\Exception $e) { return exception_text($e); } }
/** * Magic object-to-string method. * * echo $exception; * * @uses Kohana::exception_text * @return string */ public function __toString() { return exception_text($this); }