Skip to content
NotORM Panel for Tracy for debugging
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
NotOrmTracyPanel.php
README.md
composer.json
composer.lock

README.md

notorm-tracy-panel

NotORM Panel for Tracy for debugging

Instalation

Fastest use with all comforts

NotOrmTracyPanel::simpleInit($notorm, $pdo);

or just

NotOrmTracyPanel::simpleInit($notorm);

Basic usage

$panel = NotOrmTracyPanel::getInstance(); // or new NotOrmTracyPanel()
\Tracy\Debugger::getBar()->addPanel($panel);

$notorm->debug = function($query, $parameters) {
	NotOrmTracyPanel::getInstance()->logQuery($query, $parameters);
};

Using with time measurement

$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());
};

You can set driver info

$panel->setPlatform($pdo->getAttribute(PDO::ATTR_DRIVER_NAME));

You can use SQL Explain utility, if you set NotORM or PDO connection

$panel->setNotOrm($notorm);

or

$panel->setPdo($pdo);

Result?

Panel

Changelog

v1.0.0 (2015-01-13)

  • initial release

v1.0.1 (2017-01-30)

  • Add new versions of packages

(c) Martin Zeman (Zemistr), 2015 (http://zemistr.eu)

You can’t perform that action at this time.