public function __toString() { if ($this->hasScheme()) { return $this->getScheme() . ':' . $this->getSchemeRelativeUrl(); } if ($this->hasHost()) { return $this->getSchemeRelativeUrl(); } return $this->getHostRelativeUrl(); }