public function getUrlGenerator() : UrlGenerator { if (!$this->urlGenerator) { $this->urlGenerator = new UrlGenerator($this->routerContainer->getGenerator()); } return $this->urlGenerator; }