/** * dump everything we have */ public function __destruct() { if ($this->activated) { // include any queued time data from Xmf\Debug $queue = \Xmf\Debug::dumpQueuedTimers(true); if (!empty($queue)) { foreach ($queue as $q) { $this->debugbar['time']->addMeasure($q['label'], $q['start'], $q['start'] + $q['elapsed']); } } $this->addToTheme(); $this->addExtra(_MD_DEBUGBAR_PHP_VERSION, PHP_VERSION); $this->addExtra(_MD_DEBUGBAR_INCLUDED_FILES, (string) count(get_included_files())); if (false === $this->quietmode) { if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { // default for ajax, do not initialize a new toolbar, just add dataset $log = $this->renderer->render(false); } else { $log = $this->renderer->render(); } echo $log; } else { $this->debugbar->sendDataInHeaders(); } } }