class RegisterStreamWrappersPass
Same name in other branches
- 9 core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterStreamWrappersPass.php \Drupal\Core\DependencyInjection\Compiler\RegisterStreamWrappersPass
- 10 core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterStreamWrappersPass.php \Drupal\Core\DependencyInjection\Compiler\RegisterStreamWrappersPass
- 11.x core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterStreamWrappersPass.php \Drupal\Core\DependencyInjection\Compiler\RegisterStreamWrappersPass
Adds services tagged 'stream_wrapper' to the stream_wrapper_manager service.
Hierarchy
- class \Drupal\Core\DependencyInjection\Compiler\RegisterStreamWrappersPass implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
Expanded class hierarchy of RegisterStreamWrappersPass
1 file declares its use of RegisterStreamWrappersPass
- CoreServiceProvider.php in core/
lib/ Drupal/ Core/ CoreServiceProvider.php
File
-
core/
lib/ Drupal/ Core/ DependencyInjection/ Compiler/ RegisterStreamWrappersPass.php, line 11
Namespace
Drupal\Core\DependencyInjection\CompilerView source
class RegisterStreamWrappersPass implements CompilerPassInterface {
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container) {
if (!$container->hasDefinition('stream_wrapper_manager')) {
return;
}
$stream_wrapper_manager = $container->getDefinition('stream_wrapper_manager');
foreach ($container->findTaggedServiceIds('stream_wrapper') as $id => $attributes) {
$class = $container->getDefinition($id)
->getClass();
$scheme = $attributes[0]['scheme'];
$stream_wrapper_manager->addMethodCall('addStreamWrapper', [
$id,
$class,
$scheme,
]);
}
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.