public function generateServerUrl($path = null) { if (!$this->serverUrlHelper) { $this->serverUrlHelper = $this->container->get(ServerUrlHelper::class); } return $this->serverUrlHelper->generate($path); }
/** * Generate a fully qualified URI, relative to $path. * * @param null|string $path * @return string */ public function generateServerUrl($path = null) { return $this->serverUrlHelper->generate($path); }
/** * Return a path relative to the current request URI. * * Proxies to `Zend\Expressive\Helper\ServerUrlHelper::generate()`. * * @param null|string $path * @return string */ public function __invoke($path = null) { return $this->helper->generate($path); }
/** * Render absolute url from a path * * Usage: {{ absolute_url('path/to/something') }} * Generates: http://example.com/path/to/something * * @param $path * * @return string */ public function renderUrlFromPath($path = null) { return $this->serverUrlHelper->generate($path); }