Helper for making easy links and getting urls that depend on the routes and router.
More...
|
| __invoke ($name=null, $params=[], $options=[], $reuseMatchedParams=false) |
| Generates a url given the name of a route.
|
|
| setRouter ($router) |
| Set the router to use for assembling.
|
|
| setRouteMatch ($routeMatch) |
| Set route match returned by the router.
|
|
| setView (Renderer $view) |
| Set the View object.
|
|
| getView () |
| Get the view object.
|
|
Helper for making easy links and getting urls that depend on the routes and router.
__invoke |
( |
|
$name = null , |
|
|
|
$params = [] , |
|
|
|
$options = [] , |
|
|
|
$reuseMatchedParams = false |
|
) |
| |
Generates a url given the name of a route.
- See Also
- Zend::assemble()
-
Zend::assemble()
- Parameters
-
string | $name | Name of the route |
array | $params | Parameters for the link |
array | Traversable | $options | Options for the route |
bool | $reuseMatchedParams | Whether to reuse matched parameters |
- Returns
- string Url For the link href attribute
- Exceptions
-
Exception\RuntimeException | If no RouteStackInterface was provided |
Exception\RuntimeException | If no RouteMatch was provided |
Exception\RuntimeException | If RouteMatch didn't contain a matched route name |
Exception\InvalidArgumentException | If the params object was not an array or Traversable object. |
setRouteMatch |
( |
|
$routeMatch | ) |
|
Set route match returned by the router.
- Parameters
-
LegacyRouteMatch | RouteMatch | $routeMatch | |
- Returns
- Url
Set the router to use for assembling.
- Parameters
-
LegacyRouteStackInterface | RouteStackInterface | $router | |
- Returns
- Url
- Exceptions
-
Exception\InvalidArgumentException | for invalid router types. |