public function close()
 {
     if ($this->panel) {
         $this->panel->snapshotUnitOfWork($this);
     }
     parent::close();
 }
 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);
 }
Beispiel #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);
     });
 }