/** * @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); }
/** * Returns a data collector * * @param string $name * @return \DebugBar\DataCollectorInterface * @static */ public static function getCollector($name) { //Method inherited from \DebugBar\DebugBar return \Barryvdh\Debugbar\LaravelDebugbar::getCollector($name); }