public function ProfilerSubscriber::__construct in Devel 8.3
Same name and namespace in other branches
- 8 webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::__construct()
- 8.2 webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::__construct()
- 4.x webprofiler/src/EventSubscriber/ProfilerSubscriber.php \Drupal\webprofiler\EventSubscriber\ProfilerSubscriber::__construct()
Parameters
\Symfony\Component\HttpKernel\Profiler\Profiler $profiler: A Profiler instance.
\Symfony\Component\HttpFoundation\RequestStack $requestStack: A RequestStack instance.
\Symfony\Component\HttpFoundation\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 49
Class
Namespace
Drupal\webprofiler\EventSubscriberCode
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;
}