コード例 #1
0
 /**
  * Gets the 'profiler' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Symfony\Component\HttpKernel\Profiler\Profiler A Symfony\Component\HttpKernel\Profiler\Profiler instance.
  */
 protected function getProfilerService()
 {
     $a = $this->get('monolog.logger.profiler');
     $b = $this->get('kernel');
     $c = new \Symfony\Component\HttpKernel\DataCollector\EventDataCollector();
     $c->setEventDispatcher($this->get('event_dispatcher'));
     $this->services['profiler'] = $instance = new \Symfony\Component\HttpKernel\Profiler\Profiler(new \Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage('sqlite:/var/www/test2/app/cache/dev/profiler.db', '', '', 86400), $a);
     $instance->add(new \Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector($b));
     $instance->add($this->get('data_collector.request'));
     $instance->add(new \Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector());
     $instance->add($c);
     $instance->add(new \Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector($a));
     $instance->add(new \Symfony\Bundle\FrameworkBundle\DataCollector\TimerDataCollector($b));
     $instance->add(new \Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector());
     $instance->add(new \Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector($this->get('security.context')));
     $instance->add(new \Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector($this, false));
     $instance->add(new \Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector($this->get('doctrine'), $this->get('doctrine.dbal.logger')));
     return $instance;
 }
コード例 #2
0
 /**
  * Gets the 'data_collector.events' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * This service is private.
  * If you want to be able to request this service from the container directly,
  * make it public, otherwise you might end up with broken code.
  *
  * @return Symfony\Component\HttpKernel\DataCollector\EventDataCollector A Symfony\Component\HttpKernel\DataCollector\EventDataCollector instance.
  */
 protected function getDataCollector_EventsService()
 {
     $this->services['data_collector.events'] = $instance = new \Symfony\Component\HttpKernel\DataCollector\EventDataCollector();
     $instance->setEventDispatcher($this->get('event_dispatcher'));
     return $instance;
 }
コード例 #3
0
 /**
  * Gets the 'profiler' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Symfony\Component\HttpKernel\Profiler\Profiler A Symfony\Component\HttpKernel\Profiler\Profiler instance.
  */
 protected function getProfilerService()
 {
     $a = $this->get('monolog.logger.profiler');
     $b = $this->get('kernel');
     $c = new \Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector();
     $c->setKernel($b);
     $d = new \Symfony\Component\HttpKernel\DataCollector\EventDataCollector();
     $d->setEventDispatcher($this->get('event_dispatcher'));
     $e = new \Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector($this->get('doctrine'));
     $e->addLogger('default', $this->get('doctrine.dbal.logger.profiling.default'));
     $this->services['profiler'] = $instance = new \Symfony\Component\HttpKernel\Profiler\Profiler(new \Symfony\Component\HttpKernel\Profiler\FileProfilerStorage('file:/var/www/bewelcome-symfony/app/cache/dev/profiler', '', '', 86400), $a);
     $instance->add($c);
     $instance->add($this->get('data_collector.request'));
     $instance->add(new \Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector());
     $instance->add($d);
     $instance->add(new \Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector($a));
     $instance->add(new \Symfony\Component\HttpKernel\DataCollector\TimeDataCollector($b));
     $instance->add(new \Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector());
     $instance->add($this->get('data_collector.router'));
     $instance->add(new \Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector($this->get('security.context')));
     $instance->add(new \Symfony\Bridge\Swiftmailer\DataCollector\MessageDataCollector($this, true));
     $instance->add($e);
     return $instance;
 }