public static function createFromParse(array $parts)
    {
        $uri = new static();
        if (isset($parts['schema'])) {
            $uri->scheme = UriFilter::scheme($parts['schema']);
        }
        if (isset($parts['host'])) {
            $uri->host = UriFilter::host($parts['host']);
        }
        if (isset($parts['port'])) {
            $uri->port = UriFilter::port($parts['port']);
        }
        if (isset($parts['path'])) {
            $uri->path = UriFilter::path($parts['path']);
        }
        if (isset($parts['query'])) {
            $uri->query = UriFilter::body($parts['query']);
        }
        if (isset($parts['fragment'])) {
            $uri->fragment = UriFilter::body($parts['fragment']);
        }
        if (isset($parts['user'])) {
            $uri->userInfo = $parts['user'];
        }
        if (isset($parts['pass'])) {
            $uri->userInfo .= ':' . $parts['pass'];
        }
        $uri->validate();
        return $uri;
    }