Get the value stored against one of the request superglobals.

@param string $superglobal
@param mixed $index

@return mixed
515652
protected function getSuperglobalValue($superglobal, $index, $defaultValue = null)
    {
        $propertyName = $superglobal . 'Data';

        if (isset($this->$propertyName)){
            $data = $this->$propertyName;

            if (isset($data[$index])){
                return $data[$index];
            }
        }

        return $defaultValue;
    }
434616
public function getParameter($index)
    {
        if (!$this->hasParameter($index)) {
            throw new \InvalidArgumentException(sprintf('Cannot retrieve parameter "%s"', $index));
        }

        return $this->parameters[$index];
    }
401892
public static function getGlobal(string $name)
    {
        if (isset(self::$globalOptions[$name])) {
            return self::$globalOptions[$name];
        } else {
            return null;
        }
    }
549396
public function offsetGet( $index )
    {
        return call_user_func(
            $this->fetchCallback,
            pg_fetch_array( $this->resource, $index, $this->fetchType )
        );
    }
791085
public function getQuery($index = false)
    {
        return ($index) ? array_value($this->query, $index) : $this->query;
    }
844031
public function get($index, $defaultValue = null, $remove = false)
    {
        $key = $this->prepareIndex($index);

        if (!isset($this->memory[$key])) {
            return $defaultValue;
        }

        $return = $this->memory[$key];

        if ($remove) {
            unset($this->memory[$key]);
        }

        return $return;
    }
1336810
@Override
    public T get(int index) {
        if (displacement != null) {
            return super.get(index - displacement);
        }
        return super.get(index);
    }
1117440
public function getTokenAt($index) {
        // Get token from behind
        if ($index < 0) {
            $index = count($this->tokens) + $index;
        }

        return $this->tokens[$index];
    }
481660
public function get(int $index)
    {
        $this->internalDataListUpdate();
        if (isset($this->internalDataListData[$index])) {
            return $this->internalDataListUpdateValueIfNeeded($this->internalDataListData, $index);
        }
        return null;
    }
1353226
public function get(int $index) {
        if ($index < 0 || $index >= $this->size()) {
            throw new IndexOutOfBoundsException();
        }
        return $this->array[$index];

    }
929965
public function get_stream($index) {
        if (!isset($this->za)) {
            return false;
        }

        $name = $this->za->getNameIndex($index);
        if ($name === false) {
            return false;
        }

        return $this->za->getStream($name);
    }
901240
public function get_request_comp(int $index=null) {
		$comp = $this->request_comp;
		if ($index === null)
			return $comp;
		if (isset($comp[$index]))
			return $comp[$index];
		return null;
	}
269920
private function _get($index, $accept_reverse_index)
    {
        $values = $this->getValues();
        if ($accept_reverse_index){
            $index = $this->_rindex($index, $values);
        }
        return $values[$index] ?? null;
    }
464530
protected function getMethodParam($index)
    {
        if (isset($this->methodParams[$index]) && ($value = intval($this->methodParams[$index])) > 0) {
            return $value;
        }

        return null;
    }
862214
public function get($index, $defaultValue = null)
    {
        if (isset($this->{$index})) {
            return $this->{$index};
        }

        $config = $this;
        $keys = explode('.', $index);

        while (!empty($keys)) {
            $key = array_shift($keys);

            if (!isset($config->{$key})) {
                break;
            }

            if (empty($keys)) {
                return $config->{$key};
            }

            $config = $config->{$key};

            if (empty($config)) {
                break;
            }
        }

        return $defaultValue;
    }
10954
protected function bindVarSuperGlobal($option, ServerRequestInterface $request, &$value)
    {
        if (preg_match('/^\$_(GET|POST|COOKIE)\[([^\[]*)\]$/i', $option, $matches)) {
            list(, $var, $key) = $matches;

            $var = strtolower($var);
            $data = null;

            if ($var === 'get') {
                $data = $request->getQueryParams();                
            } elseif ($var === 'post') {
                $data = $request->getParsedBody();
            } elseif ($var === 'cookie') {
                $data = $request->getCookieParams();
            }

            $value = isset($data[$key]) ? [$data[$key]] : null;
            return true;
        }
        
        return false;
    }
342255
public function get($index, $defaultValue = null, $filtered = true)
    {
        if ($this->data->offsetExists($index)) {

            if ($filtered === true) {
                // pretty high-level filtering here...
                return self::filter($this->data->offsetGet($index));
            }

            return $this->data->offsetGet($index);
        }

        return $defaultValue;
    }