mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 05:37:39 +02:00
updated Nette\Debugger
This commit is contained in:
@@ -49,18 +49,20 @@ class DibiNettePanel extends DibiObject implements IBarPanel
|
|||||||
|
|
||||||
public function register(DibiConnection $connection)
|
public function register(DibiConnection $connection)
|
||||||
{
|
{
|
||||||
|
static $done;
|
||||||
if (is_callable('Nette\Diagnostics\Debugger::enable') && !class_exists('NDebugger')) {
|
if (is_callable('Nette\Diagnostics\Debugger::enable') && !class_exists('NDebugger')) {
|
||||||
class_alias('Nette\Diagnostics\Debugger', 'NDebugger'); // PHP 5.2 code compatibility
|
class_alias('Nette\Diagnostics\Debugger', 'NDebugger'); // PHP 5.2 code compatibility
|
||||||
}
|
}
|
||||||
if (is_callable('NDebugger::enable')) {
|
if (is_callable('NDebugger::enable')) {
|
||||||
NDebugger::$bar && NDebugger::$bar->addPanel($this);
|
NDebugger::$bar && NDebugger::$bar->addPanel($this);
|
||||||
NDebugger::$blueScreen && NDebugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
|
NDebugger::$blueScreen && !$done && NDebugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
|
||||||
$connection->onEvent[] = array($this, 'logEvent');
|
$connection->onEvent[] = array($this, 'logEvent');
|
||||||
} elseif (is_callable('Debugger::enable')) {
|
} elseif (is_callable('Debugger::enable')) {
|
||||||
Debugger::$bar && Debugger::$bar->addPanel($this);
|
Debugger::$bar && Debugger::$bar->addPanel($this);
|
||||||
Debugger::$blueScreen && Debugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
|
Debugger::$blueScreen && !$done && Debugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
|
||||||
$connection->onEvent[] = array($this, 'logEvent');
|
$connection->onEvent[] = array($this, 'logEvent');
|
||||||
}
|
}
|
||||||
|
$done = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
BIN
examples/data/arrow.png
Normal file
BIN
examples/data/arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@@ -15,7 +15,7 @@ require_once '../dibi/dibi.php';
|
|||||||
|
|
||||||
|
|
||||||
// enable Nette Debugger
|
// enable Nette Debugger
|
||||||
ndebug();
|
debug();
|
||||||
|
|
||||||
|
|
||||||
dibi::connect(array(
|
dibi::connect(array(
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||||
|
|
||||||
|
<style> html { background: url(data/arrow.png) no-repeat bottom right; height: 100%; } </style>
|
||||||
|
|
||||||
<h1>Nette Debugger & Variables | dibi</h1>
|
<h1>Nette Debugger & Variables | dibi</h1>
|
||||||
|
|
||||||
<p>Dibi can dump variables via Nette Debugger, part of Nette Framework.</p>
|
<p>Dibi can dump variables via Nette Debugger, part of Nette Framework.</p>
|
||||||
|
Reference in New Issue
Block a user