/** * @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); }
/** * Checks if a data collector has been added * * @param string $name * @return boolean * @static */ public static function hasCollector($name) { //Method inherited from \DebugBar\DebugBar return \Barryvdh\Debugbar\LaravelDebugbar::hasCollector($name); }