Zend\View\Helper\Url::__invoke
Generates a url given the name of a route.
Signature
public function __invoke([string
$name = null,
[array
$params = false,
[array|Traversable
$options = false,
[bool
$reuseMatchedParams = false]]]] )
Parameters
$name
—
string
- Name of the route
$params
—
array
- Parameters for the link
$options
—
array
- Options for the route
$reuseMatchedParams
—
object
- Whether to reuse matched parameters
Returns
- string
- Url For the link href attribute
Errors/Exceptions
-
RuntimeException
- If no RouteStackInterface was provided
-
RuntimeException
- If no RouteMatch was provided
-
RuntimeException
- If RouteMatch didn't contain a matched route name
-
InvalidArgumentException
- If the params object was not an array or \Traversable object