public Url::getUri()
Returns the URI value for this Url object.
Only to be used if self::$unrouted is TRUE.
string A URI not connected to a route. May be an external URL.
\UnexpectedValueException Thrown when the URI was requested for a routed URL.
public function getUri() { if (!$this->unrouted) { throw new \UnexpectedValueException('This URL has a Drupal route, so the canonical form is not a URI.'); } return $this->uri; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Url.php/function/Url::getUri/8.1.x