Esempio n. 1
0
 public function __construct(ContainerInterface $container, ProfilerStorageInterface $storage, LoggerInterface $logger = null)
 {
     parent::__construct($storage, $logger);
     foreach ($container->findTaggedServiceIds('data_collector') as $id => $attributes) {
         $this->add($container->get($id));
     }
 }
Esempio n. 2
0
 public function __construct(ContainerInterface $container, ProfilerStorage $profilerStorage, LoggerInterface $logger = null)
 {
     parent::__construct($profilerStorage, $logger);
     $this->container = $container;
     $this->initCollectors();
     $this->loadCollectorData();
 }
Esempio n. 3
0
 /**
  * Profiler constructor.
  * @param ProfilerStorageInterface $storage
  * @param LoggerInterface $logger
  * @param bool $defaultEnabled
  * @param null $class
  * @param null $dsn
  * @param null $username
  * @param null $password
  * @param int $ttl
  */
 public function __construct(ProfilerStorageInterface $storage, LoggerInterface $logger, $defaultEnabled = true, $class = null, $dsn = null, $username = null, $password = null, $ttl = 3600)
 {
     if ($defaultEnabled !== true) {
         $storage = new $class($dsn, $username, $password, $ttl);
     }
     parent::__construct($storage, $logger);
 }
Esempio n. 4
0
 /**
  * Constructor.
  *
  * @param \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface $storage
  *   A ProfilerStorageInterface instance
  * @param \Psr\Log\LoggerInterface $logger
  *   A LoggerInterface instance
  * @param \Drupal\Core\Config\ConfigFactoryInterface $config
  */
 public function __construct(ProfilerStorageInterface $storage, LoggerInterface $logger = NULL, ConfigFactoryInterface $config)
 {
     parent::__construct($storage, $logger);
     $this->localStorage = $storage;
     $this->localLogger = $logger;
     $this->config = $config;
     $this->activeToolbarItems = $this->config->get('webprofiler.config')->get('active_toolbar_items');
 }