public function getUri(Uri $uri) { if ($this->baseUrl === null) { throw new \RuntimeException('Cannot get uri: no base Url set'); } return $this->getUrl($this->baseUrl->withUri($uri)); }