You are here

class StoragePass in XHProf 8

Adds available storage handlers to manager in container.

Hierarchy

  • class \Drupal\xhprof\Compiler\StoragePass implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface

Expanded class hierarchy of StoragePass

1 file declares its use of StoragePass
XhprofServiceProvider.php in src/XhprofServiceProvider.php

File

src/Compiler/StoragePass.php, line 12

Namespace

Drupal\xhprof\Compiler
View source
class StoragePass implements CompilerPassInterface {

  /**
   * {@inheritdoc}
   */
  public function process(ContainerBuilder $container) {
    if (FALSE === $container
      ->hasDefinition('xhprof.storage_manager')) {
      return;
    }
    $definition = $container
      ->getDefinition('xhprof.storage_manager');
    $services = array_keys($container
      ->findTaggedServiceIds('xhprof_storage'));
    foreach ($services as $id) {
      $definition
        ->addMethodCall('addStorage', [
        $id,
        new Reference($id),
      ]);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
StoragePass::process public function You can modify the container here before it is dumped to PHP code.