mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 14:16:39 +02:00
updated for new Nette Debug Bar
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
* @copyright Copyright (c) 2005, 2010 David Grudl
|
||||
* @package dibi
|
||||
*/
|
||||
class DibiException extends Exception implements /*Nette\*/IDebuggable
|
||||
class DibiException extends Exception implements /*Nette\*/IDebugPanel
|
||||
{
|
||||
/** @var string */
|
||||
private $sql;
|
||||
@@ -59,23 +59,39 @@ class DibiException extends Exception implements /*Nette\*/IDebuggable
|
||||
|
||||
|
||||
|
||||
/********************* interface Nette\IDebuggable ****************d*g**/
|
||||
/********************* interface Nette\IDebugPanel ****************d*g**/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns custom panels.
|
||||
* @return array
|
||||
* Returns HTML code for custom tab.
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPanels()
|
||||
public function getTab()
|
||||
{
|
||||
return 'SQL';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns HTML code for custom panel.
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPanel()
|
||||
{
|
||||
$panels = array();
|
||||
if ($this->sql !== NULL) {
|
||||
$panels['SQL'] = array(
|
||||
'expanded' => TRUE,
|
||||
'content' => dibi::dump($this->sql, TRUE),
|
||||
);
|
||||
}
|
||||
return $panels;
|
||||
return dibi::dump($this->sql, TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns panel ID.
|
||||
* @return string
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return __CLASS__;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user