protected function parseUrlArray($url)
    {
        if (strpos($url['scheme'], '+')) {
            list($url['scheme'], $url['adapter']) = explode('+', $url['scheme']);
        }

        $defaultPort = $this->defaultPort();
        if ($defaultPort && empty($url['port'])) {
            $url['port'] = $defaultPort;
        }

        if (isset($url['query'])) {
            $extra = [];
            parse_str($url['query'], $extra);
            unset($url['query']);
            $url += $extra;
        }

        $url = array_merge($this->uriKeys, $url);

        foreach (['host', 'user', 'pass'] as $key) {
            if (!isset($url[$key])) {
                continue;
            }

            $url[$key] = urldecode($url[$key]);
        }

        foreach ($url as $key => $val) {
            $setter = 'set' . ucfirst($key);
            $this->$setter($val);
        }
    }
protected function parseUrlArray($url)
    {
        if (strpos($url['scheme'], '+')) {
            list($url['scheme'], $url['adapter']) = explode('+', $url['scheme']);
        }

        $defaultPort = $this->defaultPort();
        if ($defaultPort && empty($url['port'])) {
            $url['port'] = $defaultPort;
        }

        if (isset($url['query'])) {
            $extra = [];
            parse_str($url['query'], $extra);
            unset($url['query']);
            $url += $extra;
        }

        $url = array_merge($this->uriKeys, $url);

        foreach (['host', 'user', 'pass'] as $key) {
            if (!isset($url[$key])) {
                continue;
            }

            $url[$key] = urldecode($url[$key]);
        }

        foreach ($url as $key => $val) {
            $setter = 'set' . ucfirst($key);
            $this->$setter($val);
        }
    }
protected function parseUrlArray ( $ url ) { if ( strpos ( $ url [ 'scheme' ] , '+' ) ) { list ( $ url [ 'scheme' ] , $ url [ 'adapter' ] ) = explode ( '+' , $ url [ 'scheme' ] ) ; } $ defaultPort = $ this -> defaultPort ( ) ; if ( $ defaultPort && empty ( $ url [ 'port' ] ) ) { $ url [ 'port' ] = $ defaultPort ; } if ( isset ( $ url [ 'query' ] ) ) { $ extra = [ ] ; parse_str ( $ url [ 'query' ] , $ extra ) ; unset ( $ url [ 'query' ] ) ; $ url += $ extra ; } $ url = array_merge ( $ this -> uriKeys , $ url ) ; foreach ( [ 'host' , 'user' , 'pass' ] as $ key ) { if ( ! isset ( $ url [ $ key ] ) ) { continue ; } $ url [ $ key ] = urldecode ( $ url [ $ key ] ) ; } foreach ( $ url as $ key => $ val ) { $ setter = 'set' . ucfirst ( $ key ) ; $ this -> $ setter ( $ val ) ; } }
Worker function for parseUrl

Take the passed array, and using getters update the instance

@param array $url
@return void
Worker function for parseUrl