I see it like this: create `parseUrl` method that would take url and ensure that all array keys are there (e.g. `parse_url` don't create keys with empty values, but we can add them if they're missing).

You can do any way you see fit, just an idea.