NotORM Panel for Tracy for debugging
NotOrmTracyPanel::simpleInit($notorm, $pdo);
or just
NotOrmTracyPanel::simpleInit($notorm);
$panel = NotOrmTracyPanel::getInstance(); // or new NotOrmTracyPanel()
\Tracy\Debugger::getBar()->addPanel($panel);
$notorm->debug = function($query, $parameters) {
NotOrmTracyPanel::getInstance()->logQuery($query, $parameters);
};
$panel = NotOrmTracyPanel::getInstance(); // or new NotOrmTracyPanel()
\Tracy\Debugger::getBar()->addPanel($panel);
$notorm->debug = function($query, $parameters) {
$instance = NotOrmTracyPanel::getInstance();
$instance->logQuery($query, $parameters);
$instance->startQueryTimer($instance->getIndex());
};
$notorm->debugTimer = function () {
$instance = NotOrmTracyPanel::getInstance();
$instance->stopQueryTimer($instance->getIndex());
};
$panel->setPlatform($pdo->getAttribute(PDO::ATTR_DRIVER_NAME));
$panel->setNotOrm($notorm);
or
$panel->setPdo($pdo);
v2.0.0 (2020-10-04)
- Big thanks to @janbarasek! Amazing job! ❤️
- Big package upgrade - PHPStan, PHP 7.1+, Nette 3, Tests and so on!
v1.0.1 (2017-01-30)
- Add new versions of packages
v1.0.0 (2015-01-13)
- initial release
(c) Martin Zeman (Zemistr), 2020 (http://zemistr.eu)