public function close()
 {
     if ($this->panel) {
         $this->panel->snapshotUnitOfWork($this);
     }
     parent::close();
 }
Esempio n. 2
0
 public function startQuery($sql, array $params = null, array $types = null)
 {
     $highlighted = Panel::highlightQuery(Panel::formatQuery($sql, (array) $params, (array) $types));
     $formatted = html_entity_decode(strip_tags($highlighted));
     $formatted = preg_replace('#^[\\t ]+#m', '', Nette\Utils\Strings::normalize($formatted));
     $message = '-- process ' . getmypid() . '; ' . Debugger::$source . "\n" . $formatted . "\n\n";
     file_put_contents($this->file, $message, FILE_APPEND);
 }
Esempio n. 3
0
 /**
  * Registers generic exception renderer
  */
 public static function registerBluescreen(Nette\DI\Container $dic)
 {
     Debugger::getBlueScreen()->addPanel(function ($e) use($dic) {
         return Panel::renderException($e, $dic);
     });
 }