public function Profiler::__construct in XHProf 8
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $configFactory:
\Drupal\xhprof\XHProfLib\Storage\StorageInterface $storage:
\Symfony\Component\HttpFoundation\RequestMatcherInterface $requestMatcher:
File
- src/
Profiler.php, line 55
Class
- Profiler
- Provides profiler service.
Namespace
Drupal\xhprofCode
public function __construct(ConfigFactoryInterface $configFactory, StorageInterface $storage, RequestMatcherInterface $requestMatcher) {
$this->configFactory = $configFactory;
$this->storage = $storage;
$this->requestMatcher = $requestMatcher;
$extension = $this->configFactory
->get('xhprof.config')
->get('extension');
if ($extension == 'xhprof') {
$this->activeExtension = new XHProfExtension();
}
elseif ($extension == 'uprofiler') {
$this->activeExtension = new UprofilerExtension();
}
elseif ($extension == 'tideways') {
$this->activeExtension = new TidewaysExtension();
}
elseif ($extension == 'tideways_xhprof') {
$this->activeExtension = new TidewaysXHProfExtension();
}
}