You are here

private function ProcessFactory::getEnv in Automatic Updates 8.2

Returns the value of an environment variable.

Parameters

string $variable: The name of the variable.

Return value

mixed The value of the variable.

1 call to ProcessFactory::getEnv()
ProcessFactory::create in package_manager/src/ProcessFactory.php

File

package_manager/src/ProcessFactory.php, line 62

Class

ProcessFactory
Defines a process factory which sets the COMPOSER_HOME environment variable.

Namespace

Drupal\package_manager

Code

private function getEnv(string $variable) {
  if (function_exists('apache_getenv')) {
    return apache_getenv($variable);
  }
  return getenv($variable);
}