You are here

public function ProfilerSubscriber::__construct in Devel 8.2

Same name and namespace in other branches
  1. 8.3 webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::__construct()
  2. 8 webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::__construct()
  3. 4.x webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::__construct()

Parameters

Profiler $profiler A Profiler instance:

RequestStack $requestStack A RequestStack instance:

RequestMatcherInterface|null $matcher A RequestMatcher instance:

bool $onlyException True if the profiler only collects data when an: exception occurs, false otherwise

bool $onlyMasterRequests True if the profiler only collects data: when the request is a master request, false otherwise

File

webprofiler/src/EventSubscriber/ProfilerSubscriber.php, line 41

Class

ProfilerSubscriber

Namespace

Drupal\webprofiler\EventSubscriber

Code

public function __construct(Profiler $profiler, RequestStack $requestStack, RequestMatcherInterface $matcher = NULL, $onlyException = FALSE, $onlyMasterRequests = FALSE) {
  $this->profiler = $profiler;
  $this->matcher = $matcher;
  $this->onlyException = (bool) $onlyException;
  $this->onlyMasterRequests = (bool) $onlyMasterRequests;
  $this->profiles = new \SplObjectStorage();
  $this->parents = new \SplObjectStorage();
  $this->requestStack = $requestStack;
}