Bolt\Routing\LazyUrlGenerator::getUrlGenerator PHP Method

getUrlGenerator() public method

public getUrlGenerator ( ) : Symfony\Component\Routing\Generator\UrlGeneratorInterface
return Symfony\Component\Routing\Generator\UrlGeneratorInterface
    public function getUrlGenerator()
    {
        if (!$this->urlGenerator) {
            $this->urlGenerator = call_user_func($this->factory);
            if (!$this->urlGenerator instanceof UrlGeneratorInterface) {
                throw new \LogicException('Factory supplied to LazyUrlGenerator must return implementation of UrlGeneratorInterface.');
            }
        }
        return $this->urlGenerator;
    }