コード例 #1
0
ファイル: Query.php プロジェクト: nediam/QueryBuilder
 /**
  * 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);
     }
 }
コード例 #2
0
ファイル: Exception.php プロジェクト: nediam/QueryBuilder
 /**
  * Magic object-to-string method.
  *
  *     echo $exception;
  *
  * @uses    Kohana::exception_text
  * @return  string
  */
 public function __toString()
 {
     return exception_text($this);
 }