src/Domain/Value/Identifier/Uri.php
public static function fromArray(array $components): Uri
    {
        $scheme = $components['scheme'] ?? null;
        $authority = $components['authority'] ?? null;
        $path = $components['path'] ?? '';
        $query = $components['query'] ?? null;
        $fragment = $components['fragment'] ?? null;

        return new static($path, $scheme, $authority, $query, $fragment);
    }
public static function fromArray(array $components): Uri
    {
        $scheme = $components['scheme'] ?? null;
        $authority = $components['authority'] ?? null;
        $path = $components['path'] ?? '';
        $query = $components['query'] ?? null;
        $fragment = $components['fragment'] ?? null;

        return new static($path, $scheme, $authority, $query, $fragment);
    }
public static function fromArray ( array $ components ) : Uri { $ scheme = $ components [ 'scheme' ] ?? null ; $ authority = $ components [ 'authority' ] ?? null ; $ path = $ components [ 'path' ] ?? '' ; $ query = $ components [ 'query' ] ?? null ; $ fragment = $ components [ 'fragment' ] ?? null ; return new static ( $ path , $ scheme , $ authority , $ query , $ fragment ) ; }
Creates instance from components

The following key names should hold their respective values:

* scheme
* authority
* path
* query
* fragment

@param array $components The components

@return Uri

@throws DomainException When components are missing or invalid
Creates instance from components