M1\Vars\Variables\VariableProvider::fetchVariable PHP Method

fetchVariable() private method

Fetches the variable from the stores
private fetchVariable ( string $variable_name, string $type ) : string
$variable_name string The variable to fetch
$type string The variable type
return string The fetches value for the variable
    private function fetchVariable($variable_name, $type)
    {
        $this->checkVariableExists($variable_name, $type);
        if ($type === 'env') {
            return getenv($variable_name);
        } elseif ($type === 'replacement') {
            return $this->rstore->get($variable_name);
        }
        return $this->vstore->get($variable_name);
    }