/** * Prepares the Host part of a image resize URL * * @return mixed Route reference type */ private function prepareRouterContext() { if ($this->generatedRouteHost) { $this->router->setContext($this->modifiedContext); /** * When a Host is set for the image route, * we need to change the route context URL */ $this->router->getContext()->setHost($this->generatedRouteHost); } }
/** * @return UrlGeneratorInterface */ public function getGenerator() { $this->generator->setContext($this->getContext()); return $this->generator; }
/** * {@inheritdoc} */ public function setContext(RequestContext $context) { $this->wrapped->setContext($context); }
/** * @depends testUrlGeneratorInterface * * @param UrlGeneratorInterface $generator */ public function testRequestContext($generator) { $generator->setContext(new RequestContext('/bolt')); $this->assertSame('/bolt', $generator->getContext()->getBaseUrl()); }
/** * {@inheritdoc} */ public function setContext(RequestContext $context) { $this->router->setContext($context); }