Get request variables
@param  String $index
@param  Mixed $default
@param  Array $source
@return Mixed
762415
public function param($index=null, $default = null, $source = null) {

        $src = $source ? $source : $_REQUEST;
        $cast = null;

        if (\strpos($index, ':') !== false) {
            list($index, $cast) = \explode(':', $index, 2);
        }

        $value = fetch_from_array($src, $index, $default);

        if ($cast) {

            if (\in_array($cast, ['bool', 'boolean']) && \is_string($value) && \in_array($cast, ['true', 'false'])) {
                $value = $value == 'true' ? true : false;
            }

            \settype($value, $cast);
        }

        return $value;
    }
1040046
private function loadGlobalVar(string $name, string $source = ''): array
    {
        $encode = false;

        switch ($name) {
            case 'GET':
                $source = $_SERVER['QUERY_STRING'] ?? '';
                $encode = true;
                break;
            case 'POST': // pass
                break;
            case 'COOKIE':
                if (isset($_SERVER['HTTP_COOKIE'])) {
                    $source = implode('&', array_map('trim', explode(';', $_SERVER['HTTP_COOKIE'])));
                }
                break;
        }

        return Util::parseQueryString($source, $encode);
    }
861963
public function get($key, $default_value = null, $index_name = null)
	{

		list($index_name_x, $key) = $this->normalizeAccessKey($key, $index_name);

		if (!empty($index_name_x)) {
			$index_name = $index_name_x;
		}

		if (array_key_exists($index_name, $this->items)) {
			return $this->evaluate($this->walkConfig($this->items[$index_name], $key, $default_value));
		} else {
			return $this->evaluate($default_value);
		}
	}
141856
public function get($index, $default = null)
    {
        $indexes = explode('.', trim($index, '.'));
        $payload = $this->raw;
        $value = $default;

        foreach ($indexes as $indexValue) {
            if (!isset($payload[$indexValue])) {
                return $default;
            }
            $value = $payload = $payload[$indexValue];
        }

        return $value;
    }
238141
public function request(?string $index = null, $xss_clean = false)
    {
        // Check if a field has been provided.
        if ($index === null && \count($_REQUEST) > 0) {
            $request = [];

            // Loop through the full $_REQUEST array and return the value.
            foreach (array_keys($_REQUEST) as $key) {
                $request[$key] = $this->fetchFromArray($_REQUEST, $key, $xss_clean);
            }

            return $request;
        }

        return $this->fetchFromArray($_REQUEST, $index, $xss_clean);
    }
1370321
function get($key, $default = null)
	{
		return $_GET[$key] ?? $this->params[$key] ?? $_POST[$key] ?? $_REQUEST[$key] ?? $default;
	//	return $post && isset($_POST[$name]) ? $_POST[$name] : ($get && isset($_GET[$name]) ? $_GET[$name] : $default);
	}
564050
public static function getStringBaseValue($index, $default)
    {
        if (self::hasCustom($index)) {
            return (string) self::getCustom($index);
        }

        return (string) self::get($index, $default);
    }
1216474
public function get($varname, $default = null)
    {
        return $this->_getExists($this->_vars, $varname, $value)
            ? $value
            : $default;
    }
111883
public function variable_get($name, $default = NULL)
  {
    $vars = $this->drush->setDrushOptions(['format' => 'json'])->variableGet();
    if (!isset($vars[$name])) {
      return $default;
    }
    return $vars[$name];
  }
180908
public function &get($index, $default = null)
    {
        if ($this->exist($index)) {
            $array = $this->{$index};
            if (is_array($array)) {
                $array = new Config($array);
            }

            return $array;
        }

        return $default;
    }
620809
public static function getCustom($index, $default = null)
    {
        $key = self::getCustomKey($index);

        return LaravelConfig::get($key, $default);
    }
62045
protected function getObjectValue($source, $key, $default)
    {
        if (is_null($key)) {
            return $this->$source->all();
        }

        return $this->$source->get($key, $default);
    }
1274592
public function getVariables(int $index = null)
    {
        if (is_null($index)) {
            return $this->getRoute('variables');
        }

        return $this->getRoute('variables', $index);
    }
715725
public static function getBoolBaseValue($index, $default)
    {
        if (self::hasCustom($index)) {
            return (bool) self::getCustom($index);
        }

        return (bool) self::get($index, true);
    }
903830
public function get($index, $default = null)
	{
		if ($this->hasByIndex($index))
		{
			return $this->store[$index];
		}

		if ($default instanceof \Closure)
		{
			return $default($this);
		}

		return $default;
	}
1340047
protected function retrieveItem($source, $key, $default)
	{
		if (is_null($key))
		{
			return $this->$source->all();
		}

		return $this->$source->get($key, $default, true);
	}
810250
public function getValue($index = 0)
    {
        if ($index === 0 && $this->value === null) {
            return $this->defaultValue;
        }

        return (is_array($this->value) && array_key_exists($index, $this->value))
            ? $this->value[$index]
            : null;
    }