public function generateUri(string $name, array $substitutions = [], array $options = []): string
    {
        $this->injectRoutes();

        if (! $this->router->hasNamedRoute($name)) {
            throw new Exception\RuntimeException(sprintf(
                'Cannot generate URI based on route "%s"; route not found',
                $name
            ));
        }

        return $this->router->urlFor($name, $substitutions);
    }
public function generateUri(string $name, array $substitutions = [], array $options = []): string
    {
        $this->injectRoutes();

        if (! $this->router->hasNamedRoute($name)) {
            throw new Exception\RuntimeException(sprintf(
                'Cannot generate URI based on route "%s"; route not found',
                $name
            ));
        }

        return $this->router->urlFor($name, $substitutions);
    }
public function generateUri ( string $ name , array $ substitutions = [ ] , array $ options = [ ] ) : string { $ this -> injectRoutes ( ) ; if ( ! $ this -> router -> hasNamedRoute ( $ name ) ) { throw new Exception \ RuntimeException ( sprintf ( 'Cannot generate URI based on route "%s"; route not found' , $ name ) ) ; } return $ this -> router -> urlFor ( $ name , $ substitutions ) ; }
Generate a URI from the named route.

Takes the named route and any substitutions, and attempts to generate a
URI from it. Additional router-dependent options may be passed.

The URI generated MUST NOT be escaped. If you wish to escape any part of
the URI, this should be performed afterwards; consider passing the URI
to league/uri to encode it.

@see https://github.com/auraphp/Aura.Router#generating-a-route-path
@see http://framework.zend.com/manual/current/en/modules/zend.mvc.routing.html
@param string $name
@param array $substitutions
@param array $options
@return string
@throws Exception\RuntimeException if unable to generate the given URI.
Generate a URI from the named route .