/** * @param EntityManagerInterface $em * @param Configuration $configuration */ public function register(EntityManagerInterface $em, Configuration $configuration) { if ($this->debugbar->hasCollector('doctrine')) { $debugStack = $this->debugbar->getCollector('doctrine')->getDebugStack(); } else { $debugStack = new DebugStack(); $this->debugbar->addCollector(new DoctrineCollector($debugStack)); } $configuration->setSQLLogger($debugStack); }
public function boot(LaravelDebugbar $debugBar, EventDispatcher $eventDispatcher, ViewComposerCollector $viewComposerCollector) { $eventDispatcher->listen("creating: *", function (View $view) use($viewComposerCollector, $eventDispatcher) { foreach ($this->findApplicableComposers($view, $eventDispatcher) as $composer) { $viewComposerCollector->addViewComposer($view, $composer); } }); $debugBar->addCollector($viewComposerCollector); }
/** * Adds a data collector * * @param \DebugBar\DataCollectorInterface $collector * @throws DebugBarException * @return $this * @static */ public static function addCollector($collector) { //Method inherited from \DebugBar\DebugBar return \Barryvdh\Debugbar\LaravelDebugbar::addCollector($collector); }