function 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;
}