getEnvPlaceholders() public méthode

Returns the map of env vars used in the resolved parameter values to their placeholders.
public getEnvPlaceholders ( ) : string[][]
Résultat string[][] A map of env var names to their placeholders
 /**
  * Merges the env placeholders of another EnvPlaceholderParameterBag.
  */
 public function mergeEnvPlaceholders(self $bag)
 {
     if ($newPlaceholders = $bag->getEnvPlaceholders()) {
         $this->envPlaceholders += $newPlaceholders;
         foreach ($newPlaceholders as $env => $placeholders) {
             $this->envPlaceholders[$env] += $placeholders;
         }
     }
 }
 public function testMergeWithDifferentIdentifiersForPlaceholders()
 {
     $envName = 'DB_USER';
     $paramName = sprintf('env(%s)', $envName);
     $firstBag = new EnvPlaceholderParameterBag();
     $secondBag = new EnvPlaceholderParameterBag();
     // initialize placeholders
     $firstPlaceholder = $firstBag->get($paramName);
     $secondPlaceholder = $secondBag->get($paramName);
     $firstBag->mergeEnvPlaceholders($secondBag);
     $merged = $firstBag->getEnvPlaceholders();
     $this->assertNotEquals($firstPlaceholder, $secondPlaceholder);
     $this->assertCount(2, $merged[$envName]);
 }
 /**
  * Merges the env placeholders of another EnvPlaceholderParameterBag.
  */
 public function mergeEnvPlaceholders(self $bag)
 {
     $this->envPlaceholders = array_merge_recursive($this->envPlaceholders, $bag->getEnvPlaceholders());
 }