public function parseURI(string $uri) : array
    {
        if ($uri == '') {
            throw new \InvalidArgumentException(
                "URI Could not be empty"
            );
        }

        $parsedUri = parse_url($uri);
        if ($parsedUri === false) {
            throw new \InvalidArgumentException("Unable to parse URI: $uri");
        }

        $defaultParsedUri = [
            'user'  => null,
            'pass'  => null,
            'scheme'=> '',
            'host'  => '',
            'port'  => null,
            'path'  => '',
            'query' => '',
            'fragment' => '',
        ];

        return array_merge($defaultParsedUri, $parsedUri);
    }