1441. Class

1441.1. Zend\Mvc\Controller\Plugin\Url

1441.1.1. Methods

1441.1.1.1. fromRoute

fromRoute()

Generates a URL based on a route

Parameters:
  • string – RouteInterface name
  • array – Parameters to use in url generation, if any
  • array|bool – RouteInterface-specific options to use in url generation, if any. If boolean, and no fourth argument, used as $reuseMatchedParams
  • bool – Whether to reuse matched parameters
Return type:

string

Throws :

ExceptionDomainException if composed controller does not implement InjectApplicationEventInterface, or router cannot be found in controller event

Throws :

ExceptionRuntimeException if no RouteMatch instance or no matched route name present

Project Versions

Table Of Contents

Previous topic

1440. Class

Next topic

1442. Class

This Page