public static function createFromString($uri = ''): self
    {
        $components = UriString::parse($uri);

        return new self(
            $components['scheme'],
            $components['user'],
            $components['pass'],
            $components['host'],
            $components['port'],
            $components['path'],
            $components['query'],
            $components['fragment']
        );
    }
public static function createFromString($uri = ''): self
    {
        $components = UriString::parse($uri);

        return new self(
            $components['scheme'],
            $components['user'],
            $components['pass'],
            $components['host'],
            $components['port'],
            $components['path'],
            $components['query'],
            $components['fragment']
        );
    }
public static function createFromString ( $ uri = '' ) : self { $ components = UriString :: parse ( $ uri ) ; return new self ( $ components [ 'scheme' ] , $ components [ 'user' ] , $ components [ 'pass' ] , $ components [ 'host' ] , $ components [ 'port' ] , $ components [ 'path' ] , $ components [ 'query' ] , $ components [ 'fragment' ] ) ; }
Create a new instance from a string.

@param string|mixed $uri
Create a new instance from a string .