protected function parse($uri)
    {
        $uri     = (string) $uri;
        $matches = array();

        preg_match('!' . self::getPattern() . '!', $uri, $matches);

        $scheme    = isset($matches[2]) ? $matches[2] : null;
        $authority = isset($matches[4]) ? $matches[4] : null;
        $path      = isset($matches[5]) ? $matches[5] : null;
        $query     = isset($matches[7]) ? $matches[7] : null;
        $fragment  = isset($matches[9]) ? $matches[9] : null;

        $this->scheme    = $scheme;
        $this->authority = $authority;
        $this->path      = $path;
        $this->query     = $query;
        $this->fragment  = $fragment;

        $this->parseAuthority($authority);
        $this->parseParameters($query);
    }
protected function parse($uri)
    {
        $uri     = (string) $uri;
        $matches = array();

        preg_match('!' . self::getPattern() . '!', $uri, $matches);

        $scheme    = isset($matches[2]) ? $matches[2] : null;
        $authority = isset($matches[4]) ? $matches[4] : null;
        $path      = isset($matches[5]) ? $matches[5] : null;
        $query     = isset($matches[7]) ? $matches[7] : null;
        $fragment  = isset($matches[9]) ? $matches[9] : null;

        $this->scheme    = $scheme;
        $this->authority = $authority;
        $this->path      = $path;
        $this->query     = $query;
        $this->fragment  = $fragment;

        $this->parseAuthority($authority);
        $this->parseParameters($query);
    }
protected function parse ( $ uri ) { $ uri = ( string ) $ uri ; $ matches = array ( ) ; preg_match ( '!' . self :: getPattern ( ) . '!' , $ uri , $ matches ) ; $ scheme = isset ( $ matches [ 2 ] ) ? $ matches [ 2 ] : null ; $ authority = isset ( $ matches [ 4 ] ) ? $ matches [ 4 ] : null ; $ path = isset ( $ matches [ 5 ] ) ? $ matches [ 5 ] : null ; $ query = isset ( $ matches [ 7 ] ) ? $ matches [ 7 ] : null ; $ fragment = isset ( $ matches [ 9 ] ) ? $ matches [ 9 ] : null ; $ this -> scheme = $ scheme ; $ this -> authority = $ authority ; $ this -> path = $ path ; $ this -> query = $ query ; $ this -> fragment = $ fragment ; $ this -> parseAuthority ( $ authority ) ; $ this -> parseParameters ( $ query ) ; }
Parses the given URI into the components

@see http://tools.ietf.org/html/rfc3986#appendix-B
@param string $uri
Parses the given URI into the components