Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EnvPlaceholderParameterBag.php

function EnvPlaceholderParameterBag::mergeEnvPlaceholders

Merges the env placeholders of another EnvPlaceholderParameterBag.

1 call to EnvPlaceholderParameterBag::mergeEnvPlaceholders()
MergeExtensionConfigurationParameterBag::__construct in vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php

File

vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php, line 98

Class

EnvPlaceholderParameterBag
@author Nicolas Grekas <p@tchwork.com>

Namespace

Symfony\Component\DependencyInjection\ParameterBag

Code

public function mergeEnvPlaceholders(self $bag) : void {
    if ($newPlaceholders = $bag->getEnvPlaceholders()) {
        $this->envPlaceholders += $newPlaceholders;
        foreach ($newPlaceholders as $env => $placeholders) {
            $this->envPlaceholders[$env] += $placeholders;
        }
    }
    if ($newUnusedPlaceholders = $bag->getUnusedEnvPlaceholders()) {
        $this->unusedEnvPlaceholders += $newUnusedPlaceholders;
        foreach ($newUnusedPlaceholders as $env => $placeholders) {
            $this->unusedEnvPlaceholders[$env] += $placeholders;
        }
    }
}
RSS feed
Powered by Drupal