Reads an environment variable, taking the prefix into account.

@param string $name
The variable to read.
@return string|null
554799
protected function getValue(string $name) : ?string
    {
        $checkName = $this->envPrefix . strtoupper($name);
        return $this->environmentVariables[$checkName] ?? null;
    }
973373
protected function variable(&$name)
    {
        $s = $this->seek();
        if ($this->literal($this->lessc->vPrefix, false) &&
            ($this->variable($sub) || $this->keyword($name))) {
            if (!empty($sub)) {
                $name = array('variable', $sub);
            } else {
                $name = $this->lessc->vPrefix.$name;
            }

            return true;
        }

        $name = null;
        $this->seek($s);

        return false;
    }
346088
public function getHeader($name)
    {
        $internalName = strtolower($name);

        if (true === $this->hasHeader($internalName)) {
            $value = $this->headers[$internalName];

        } else {
            $value = null;
        }

        return $value;
    }
1173822
public function get(string $name) : string
    {
        $result = $this->configCommand($name);

        return $result->getBufferedOutput()[0];
    }
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);
    }
1142989
public function getEnv($name = null, $defaultValue = null) 
    {
        if ($name === null) {
            return $_ENV;
        }
        return (isset($_ENV[$name])) ? $_ENV[$name] : $defaultValue;
    }
1328988
private function _get(string $name)
	{
		global ${$this->_sGlobal};

		# EXIT
		if(!isset(${$this->_sGlobal}[$name])) return null;

		/** @var mixed $var */
		$var = ${$this->_sGlobal}[$name];
		if(!is_array($var)) { $var = [$var]; }

		foreach ($var as $k => $v) {
			# INNER FILTER
			if($this->_iSpecialFilterType) {
				switch ($this->_iSpecialFilterType) {
					case self::FILTER_OCTAL:
						$var[$k] = octdec($v);
						break;
				}
			}
			# FILTER
			elseif($this->_iFilterType) {
				$var[$k] = filter_var($v, $this->_iFilterType);
			}
			# AUTO
			else {
				$var[$k] = $this->_bFilter ? $this->_autoFilter($v) : $v;
			}
		}

		$this->_iSpecialFilterType = 0;
		$this->_iFilterType = 0;
		return $var;
	}
758187
public function getNamedRoute($name)
    {
        $this->getNamedRoutes();
        if ($this->hasNamedRoute($name)) {
            return $this->namedRoutes[(string) $name];
        } else {
            return null;
        }
    }
334593
public function getEncodedHeader(string $name): ?string
    {
        $offset = \strlen($name) + 2; // colon + space

        if (!isset($this->headers[$name])) {
            return null;
        }

        if (\is_array($this->headers[$name])) {
            $s = '';
            foreach ($this->headers[$name] as $email => $mailer) {
                if ($mailer != null) { // intentionally ==
                    $s .= self::encodeHeader($mailer, $offset, true);
                    $email = " <$email>";
                }
                $s .= self::append($email . ',', $offset);
            }

            return \ltrim(\substr($s, 0, -1)); // last comma
        }

        if (\preg_match('#^(\S+; (?:file)?name=)"(.*)"\z#', $this->headers[$name], $m)) { // Content-Disposition
            $offset += \strlen($m[1]);

            return $m[1] . '"' . self::encodeHeader($m[2], $offset) . '"';

        }

        return \ltrim(self::encodeHeader($this->headers[$name], $offset));
    }
190938
public static function get($name = null)
    {
        if ($name === null) {
            $name = array_shift(array_keys(self::$containers));
        }
        return self::$containers[$name] ? self::$containers[$name] : null;
    }
1205102
public function read($name = null)
    {

        if (!isset($_SESSION)) {
            return null;
        }

        if ($name === null) {
            return isset($_SESSION) ? $_SESSION : [];
        }

        return Hash::get($_SESSION, $name);
    }
219391
public function read($name = null)
	{
		$this->clear();

		$db = \App::get('db');

		if (empty($db))
		{
			return false;
		}

		if (!is_null($name))
		{
			if (Validate::positiveInteger($name))
			{
				$this->gidNumber = $name;
			}
			else
			{
				$this->cn = $name;
			}
		}

		$result = true;
		$lazyloading = false;

		if (is_numeric($this->gidNumber))
		{
			$query = "SELECT * FROM `#__xgroups` WHERE gidNumber = " . $db->quote($this->gidNumber) . ";";
		}
		else
		{
			$query = "SELECT * FROM `#__xgroups` WHERE cn = " . $db->quote($this->cn) . ";";
		}

		$db->setQuery($query);

		$result = $db->loadAssoc();

		if (empty($result))
		{
			$this->clear();
			return false;
		}

		foreach ($result as $key => $value)
		{
			if (property_exists(__CLASS__, $key) && $key{0} != '_')
			{
				$this->__set($key, $value);
			}
		}

		$this->__unset('members'); // we unset the lists so we can detect whether they have been loaded or not
		$this->__unset('invitees');
		$this->__unset('applicants');
		$this->__unset('managers');

		if (!$lazyloading)
		{
			$this->__get('members');
			$this->__get('invitees');
			$this->__get('applicants');
			$this->__get('managers');
		}

		$this->_updatedkeys = array();

		return true;
	}
642657
public static function get($name)
    {
        if (isset(self::$_cached_settings[$name])) {
            return self::$_cached_settings[$name];
        }
        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);
    }
173772
public function config_read($name) {
        global $CFG;
        if (!empty($this->plugin)) {
            $value = get_config($this->plugin, $name);
            return $value === false ? NULL : $value;

        } else {
            if (isset($CFG->$name)) {
                return $CFG->$name;
            } else {
                return NULL;
            }
        }
    }
818747
public function getVar($name = null)
    {
        $context = $this->_context;

        if ($name === null) {
            return $context->vars;
        } else {
            return isset($context->vars[$name]) ? $context->vars[$name] : null;
        }
    }
191617
public function readMapped($name)
    {
        if (!$this->hasMapping($name) && isset($this->mappings[$name])) {
            $this->addMapping($name, $this->mappings[$name]);
        }
        $value = $this->readAttribute($name);

        $value = $this->resolveMapping($name, $value);

        return $value;
    }