url
url copied to clipboard
Suggestion: add human readable toString method
When the url contains unicode, toString(), returns an url encoded string which is not human readable
$reference = Url::parse("https://test.com");
$url = $reference->resolve('/デジカ/');
echo $url->toString(); // https://test.com/%E3%83%87%E3%82%B8%E3%82%AB/
I suggest to add a new method toPrettyString() which simply returns the url decoded string.
public function toPrettyString(): string
{
return urldecode($this->url);
}
https://test.com/デジカ/