You are here

public function ProcessBuilder::addEnvironmentVariables in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/ProcessBuilder.php \Symfony\Component\Process\ProcessBuilder::addEnvironmentVariables()

Adds a set of environment variables.

Already existing environment variables with the same name will be overridden by the new values passed to this method. Pass `null` to unset a variable.

Parameters

array $variables The variables:

Return value

ProcessBuilder

File

vendor/symfony/process/ProcessBuilder.php, line 160

Class

ProcessBuilder
Process builder.

Namespace

Symfony\Component\Process

Code

public function addEnvironmentVariables(array $variables) {
  $this->env = array_replace($this->env, $variables);
  return $this;
}