Пример #1
0
 /**
  * @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);
 }
Пример #2
0
 /**
  * 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);
 }