983. Class

983.1. Zend\View\Helper\Url

Helper for making easy links and getting urls that depend on the routes and router.

983.1.1. Methods

983.1.1.1. setRouter

setRouter()

Set the router to use for assembling.

Parameters:RouteStackInterface
Return type:Url

983.1.1.2. setRouteMatch

setRouteMatch()

Set route match returned by the router.

Parameters:RouteMatch
Return type:self

983.1.1.3. __invoke

__invoke()

Generates an url given the name of a route.

Parameters:
  • string – Name of the route
  • array – Parameters for the link
  • array – Options for the route
  • bool – Whether to reuse matched parameters
Return type:

string Url For the link href attribute

Throws :

ExceptionRuntimeException If no RouteStackInterface was provided

Throws :

ExceptionRuntimeException If no RouteMatch was provided

Throws :

ExceptionRuntimeException If RouteMatch didn’t contain a matched route name

Project Versions

Table Of Contents

Previous topic

982. Class

Next topic

984. Class

This Page