/** * {@inheritDoc} */ public function generateUri($name, array $substitutions = []) { // Must inject routes prior to generating URIs. $this->injectRoutes(); if (!$this->zendRouter->hasRoute($name)) { throw new Exception\RuntimeException(sprintf('Cannot generate URI based on route "%s"; route not found', $name)); } $name = isset($this->routeNameMap[$name]) ? $this->routeNameMap[$name] : $name; $options = ['name' => $name, 'only_return_path' => true]; return $this->zendRouter->assemble($substitutions, $options); }