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);
        }
    }