dev-master
9999999-dev https://github.com/LeonardoCA/ToolsLeonardoCA tools for nette debugging
GPL-3.0 BSD-3-Clause GPL-2.0
The Requires
- php >=5.4.0
- nette/nette ~2.1
The Development Requires
nette tools debugging leonardoca
Wallogit.com
2017 © Pedro Peláez
LeonardoCA tools for nette debugging
Various tools for debugging nette applications:, (*1)
The best way to install LeonardoCA/Tools is using Composer:, (*2)
composer require leonardoca/tools:@dev
extensions:
smartDump: LeonardoCA\Tools\DI\SmartDumpExtension
smartDump:
traceMode: 2 #false|number|all
SmartDump::dump($variable);
// shortcut
sdump($variable);
// add own html block to dump panel
SmartDump::addToDumpPanel(
'
<table>
<tr><th>A</th><th>B</th><th>C</th><th>D</th></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
</table>
',
'custom info'
);
// catching output buffering to dumps panel
bs();
echo "some output to browser";
be('catch output buffering');
// tidy formatted output
$someXML =
'<?xml version="1.0" encoding="utf-8"?><something>jjj</something>
<otherwise><x1>88</x1><x2>44</x2></otherwise>';
sdump(tidyFormatXML($someXML));
SmartDump::addToDumpPanel(
'<pre>' . htmlspecialchars(tidyFormatXML($someXML)) . '</pre>',
"some XML"
);
// dumpHtml for fast debugging of html markup of Nette\Utils\Html or whole Controls
$someHtmlObject =
Nette\Utils\Html::el('a')->addClass('btn btn-danger')->setTitle(
'Danger'
)->setHtml('danger');
dumpHtml($someHtmlObject);
LeonardoCA tools for nette debugging
GPL-3.0 BSD-3-Clause GPL-2.0
nette tools debugging leonardoca