public Url::toUriString()
Generates a URI string that represents the data in the Url object.
The URI will typically have the scheme of route: even if the object was constructed using an entity: or internal: scheme. A internal: URI that does not match a Drupal route with be returned here with the base: scheme, and external URLs will be returned in their original form.
Return value
string A URI representation of the Url object data.
File
core/lib/Drupal/Core/Url.php, line 511
Class
Url Defi