public function offsetGet($offset)
    {
        if (!in_array($offset, self::$parts)) {
            throw new \OutOfBoundsException("$offset is not a valid url part");
        }
        if (isset($this->components[$offset])) {
            $ret = $this->components[$offset];
        } else {
            $ret = '';
        }
        if (is_array($ret) && $offset == self::QUERY) {
            $ret = self::queryString($ret);
        }
        return $ret;
    }
public function offsetGet($offset)
    {
        if (!in_array($offset, self::$parts)) {
            throw new \OutOfBoundsException("$offset is not a valid url part");
        }
        if (isset($this->components[$offset])) {
            $ret = $this->components[$offset];
        } else {
            $ret = '';
        }
        if (is_array($ret) && $offset == self::QUERY) {
            $ret = self::queryString($ret);
        }
        return $ret;
    }
public function offsetGet ( $ offset ) { if ( ! in_array ( $ offset , self :: $ parts ) ) { throw new \ OutOfBoundsException ( "$offset is not a valid url part" ) ; } if ( isset ( $ this -> components [ $ offset ] ) ) { $ ret = $ this -> components [ $ offset ] ; } else { $ ret = '' ; } if ( is_array ( $ ret ) && $ offset == self :: QUERY ) { $ ret = self :: queryString ( $ ret ) ; } return $ ret ; }
Returns the string value of the specified url part.
Does not allow getting properties other than the specified class constants.

@param string $offset
@return string
@throws \OutOfBoundsException
Returns the string value of the specified url part . Does not allow getting properties other than the specified class constants .