protected function getRouteFromRouter(
        $routerName,
        $routeId,
        $parameters = array(),
        $referenceType = Router::ABSOLUTE_URL
    ) {
        /** @var Router $router */
        $router =  $this->getRouter($routerName);

        if ($router == null) {
            throw new \InvalidArgumentException(sprintf("Router '%s' does not exists.", $routerName));
        }

        return $router->generate($routeId, $parameters, $referenceType);
    }
protected function getRouteFromRouter(
        $routerName,
        $routeId,
        $parameters = array(),
        $referenceType = Router::ABSOLUTE_URL
    ) {
        /** @var Router $router */
        $router =  $this->getRouter($routerName);

        if ($router == null) {
            throw new \InvalidArgumentException(sprintf("Router '%s' does not exists.", $routerName));
        }

        return $router->generate($routeId, $parameters, $referenceType);
    }
protected function getRouteFromRouter ( $ routerName , $ routeId , $ parameters = array ( ) , $ referenceType = Router :: ABSOLUTE_URL ) { /** @var Router $router */ $ router = $ this -> getRouter ( $ routerName ) ; if ( $ router == null ) { throw new \ InvalidArgumentException ( sprintf ( "Router '%s' does not exists." , $ routerName ) ) ; } return $ router -> generate ( $ routeId , $ parameters , $ referenceType ) ; }
Get a route path from the route id.

@param string         $routerName    Router name
@param string         $routeId       The name of the route
@param mixed          $parameters    An array of parameters
@param int $referenceType The type of reference to be generated (one of the constants)

@throws RouteNotFoundException              If the named route doesn't exist
@throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route
@throws InvalidParameterException           When a parameter value for a placeholder is not correct because
it does not match the requirement
@throws \InvalidArgumentException           When the router doesn't exist
@return string                              The generated URL
Get a route path from the route id .