class XhprofServiceProvider in XHProf 8
Defines a service profiler for the xhprof module.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\xhprof\XhprofServiceProvider
Expanded class hierarchy of XhprofServiceProvider
File
- src/
XhprofServiceProvider.php, line 14
Namespace
Drupal\xhprofView source
class XhprofServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
$container
->addCompilerPass(new StoragePass());
if (FALSE !== $container
->hasDefinition('profiler')) {
$container
->register('webprofiler.xhprof', XHProfDataCollector::class)
->addArgument(new Reference('xhprof.profiler'))
->addTag('data_collector', [
'template' => '@xhprof/Collector/xhprof.html.twig',
'id' => 'xhprof',
'title' => 'XHProf',
'priority' => 50,
]);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServiceProviderBase:: |
public | function |
Modifies existing service definitions. Overrides ServiceModifierInterface:: |
5 |
XhprofServiceProvider:: |
public | function |
Registers services to the container. Overrides ServiceProviderBase:: |