function ExtensionTrait::executeConfiguratorCallback
4 calls to ExtensionTrait::executeConfiguratorCallback()
- AbstractExtension::load in vendor/
symfony/ dependency-injection/ Extension/ AbstractExtension.php - Loads a specific configuration.
- AbstractExtension::prepend in vendor/
symfony/ dependency-injection/ Extension/ AbstractExtension.php - Allow an extension to prepend the extension configurations.
- BundleExtension::load in vendor/
symfony/ http-kernel/ Bundle/ BundleExtension.php - Loads a specific configuration.
- BundleExtension::prepend in vendor/
symfony/ http-kernel/ Bundle/ BundleExtension.php - Allow an extension to prepend the extension configurations.
File
-
vendor/
symfony/ dependency-injection/ Extension/ ExtensionTrait.php, line 33
Class
- ExtensionTrait
- @author Yonel Ceruto <yonelceruto@gmail.com>
Namespace
Symfony\Component\DependencyInjection\ExtensionCode
private function executeConfiguratorCallback(ContainerBuilder $container, \Closure $callback, ConfigurableExtensionInterface $subject, bool $prepend = false) : void {
$env = $container->getParameter('kernel.environment');
$loader = $this->createContainerLoader($container, $env, $prepend);
$file = (new \ReflectionObject($subject))->getFileName();
$bundleLoader = $loader->getResolver()
->resolve($file);
if (!$bundleLoader instanceof PhpFileLoader) {
throw new \LogicException('Unable to create the ContainerConfigurator.');
}
$bundleLoader->setCurrentDir(\dirname($file));
$instanceof =& \Closure::bind(fn&() => $this->instanceof, $bundleLoader, $bundleLoader)();
try {
$callback(new ContainerConfigurator($container, $bundleLoader, $instanceof, $file, $file, $env));
} finally {
$instanceof = [];
$bundleLoader->registerAliasesForSinglyImplementedInterfaces();
}
}