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

package Zend_View
subpackage Helper

 Methods

Generates an url given the name of a route.

__invoke(string $name, array $params, array $options, bool $reuseMatchedParams) : string

see \Zend\Mvc\Router\RouteInterface::assemble()

Parameters

$name

string

Name of the route

$params

array

Parameters for the link

$options

array

Options for the route

$reuseMatchedParams

bool

Whether to reuse matched parameters

Exceptions

\Zend\View\Exception\RuntimeException If no RouteStackInterface was provided
\Zend\View\Exception\RuntimeException If no RouteMatch was provided
\Zend\View\Exception\RuntimeException If RouteMatch didn't contain a matched route name

Returns

stringUrl For the link href attribute

Get the view object

getView() : null | \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::getView()

Returns

Set route match returned by the router.

setRouteMatch(\Zend\Mvc\Router\RouteMatch $routeMatch) : \Zend\View\Helper\self

Parameters

Returns

\Zend\View\Helper\self

Set the router to use for assembling.

setRouter(\Zend\Mvc\Router\RouteStackInterface $router) : \Zend\View\Helper\Url

Set the View object

setView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::setView()

Parameters

Returns

 Properties

 

RouteInterface match returned by the router.

$routeMatch : \Zend\View\Helper\RouteMatch.

 

RouteStackInterface instance.

$router : \Zend\Mvc\Router\RouteStackInterface

 

View object

$view : \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::$$view