Search the different places for environment variables and return first value found.

@param string $name

@return string|null
349333
public static function get(string $name): ?string
    {
        if (isset($_ENV[$name])) {
            return $_ENV[$name];
        }

        if (isset($_SERVER[$name])) {
            return $_SERVER[$name];
        }

        $value = \getenv($name);

        return $value === false ? null : $value; // switch getenv default to null
    }
401892
public static function getGlobal(string $name)
    {
        if (isset(self::$globalOptions[$name])) {
            return self::$globalOptions[$name];
        } else {
            return null;
        }
    }
955635
function findProperty($name)
    {
        //Get rid of get/set and get the singularized prop name
        $property = Reflection::getProperty($name);

        foreach ($this->properties as $p)
        {
            if ($p->matches($property))
            {
                return $p;
            }
        }

        return null;
    }
270734
public function allFor($name) {

			// Loop through environments
			$result = array();
			foreach ($this->_envSettings as $env => $settings) {
				$result[$env] = $settings[$name];
			}
			return $result;

		}
1112001
public function getEnvironmentValue($name)
    {
        $name = strtolower($name);
        $service = $this->getService();

        foreach ($service->getEnvironment() as $environment) {
            list($key, $value) = explode('=', $environment);
            if (strtolower($key) !== $name) {
                continue;
            }

            return $value;
        }

        return null;
    }
747427
public function get($name = null)
    {
        if (!$name) {
            return self::$_postTypes;
        }
        
        $name = ucfirst($name);

        if ($this->check($name)) {
            return self::$_postTypes[$name];
        }
        return false;
    }
1266532
private function readEnvironmentVariable($name){
		if (isset($_SERVER[$name])) {
			return $_SERVER[$name];
		} else if (isset($_SERVER[strtolower($name)])) {
			return $_SERVER[strtolower($name)];
		} else {
			return null;
		}
	}
459649
public function getResult($name)
    {
        if (!empty($this->results[$name])) {
            return $this->results[$name];
        }

        return null;
    }
884908
private static function environmentVariableExists($name)
    {
        switch (true) {
            case array_key_exists($name, $_ENV):
                return true;
            case array_key_exists($name, $_SERVER):
                return true;
            default:
                $value = getenv($name);
                return $value !== false;
        }
    }
623271
public function getPath($name)
    {
        return \array_key_exists($name, $this->paths) ? $this->paths[$name] : null;
    }
262704
public static function get(string $name)
  {
    if (isset($_SESSION['application']['with'][$name])) {
      $_SESSION['application']['flash']['used'] = true;
      return $_SESSION['application']['with'][$name];
    }

    return Variable::has($name) ? Variable::$data[$name] : null;
  }
1113742
protected function getEnv($name)
    {
        $prefix = isset(self::$config['application']['env_prefix']) ? self::$config['application']['env_prefix'] : '';
        if (array_key_exists($prefix . $name, $this->env)) {
            return $this->env[$prefix . $name];
        }

        return getenv($prefix . $name);
    }
936678
protected function get(string $name)
    {
        $name[0] = strtolower($name[0]);

        return $this->list[$name] ?? null;
    }
650792
public function getEphemeral($name)
    {
        $ephemeral = $this->get(self::EPHEMERAL);
        if (isset($ephemeral[$name][self::VARIABLE])) {
            return $ephemeral[$name][self::VARIABLE];
        } else {
            return null;
        }
    }
905822
public static function get($name)
    {
        if (self::$options & self::USE_ENV_ARRAY) {
            $value = isset($_ENV[$name]) ? $_ENV[$name] : false;
        } elseif (self::$options & self::LOCAL_FIRST) {
            $value = getenv($name, true);

            if ($value === false) {
                $value = getenv($name);
            }
        } else {
            $value = getenv($name);
        }

        if ($value === false) {
            return self::$default;
        }

        return self::convert($value);
    }
557712
public function getValue(string $name): ?string
    {
        if (isset($this->data[$name])) {
            return $this->data[$name]->value;
        }
        return null;
    }
518086
public function getPlaceholder($name)
    {
        return isset($this->_placeholders[$name]) ? $this->_placeholders[$name] : null;
    }