src/Request/Request.php
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;
    }
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;
    }
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 ; }
Get the value stored against one of the request superglobals.

@param string $superglobal
@param mixed $index

@return mixed
Get the value stored against one of the request superglobals .