public static function fromParts(array $parts): UriInterface
    {
        $uri = new self();
        $uri->applyParts($parts);
        $uri->validateState();

        return $uri;
    }
public static function fromParts(array $parts): UriInterface
    {
        $uri = new self();
        $uri->applyParts($parts);
        $uri->validateState();

        return $uri;
    }
public static function fromParts ( array $ parts ) : UriInterface { $ uri = new self ( ) ; $ uri -> applyParts ( $ parts ) ; $ uri -> validateState ( ) ; return $ uri ; }
Creates a URI from a hash of `parse_url` components.

@param array $parts

@return UriInterface
@link http://php.net/manual/en/function.parse-url.php

@throws TypeError If the components do not form a valid URI.
Creates a URI from a hash of parse_url components .