Url
extends Url
in package
Url view helper (extending core Laminas helper with additional functionality)
Tags
Table of Contents
- $request : Request
- Request (or null if unavailable)
- __construct() : mixed
- Constructor
- __invoke() : self|string
- Generates a url given the name of a route.
- addQueryParameters() : string
- Get URL with current GET parameters and add one
Properties
$request
Request (or null if unavailable)
protected
Request
$request
= null
Methods
__construct()
Constructor
public
__construct([Request $request = null ]) : mixed
Parameters
- $request : Request = null
-
Request object for GET parameters
Return values
mixed —__invoke()
Generates a url given the name of a route.
public
__invoke([string $name = null ][, array<string|int, mixed> $params = [] ][, array<string|int, mixed>|Traversable $options = [] ][, bool $reuseMatchedParams = false ]) : self|string
Parameters
- $name : string = null
-
Name of the route
- $params : array<string|int, mixed> = []
-
Parameters for the link
- $options : array<string|int, mixed>|Traversable = []
-
Options for the route
- $reuseMatchedParams : bool = false
-
Whether to reuse matched parameters
Tags
Return values
self|string —Url For the link href attribute
addQueryParameters()
Get URL with current GET parameters and add one
public
addQueryParameters(array<string|int, mixed> $params[, bool $reuseMatchedParams = true ]) : string
Parameters
- $params : array<string|int, mixed>
-
Key-paired parameters
- $reuseMatchedParams : bool = true
-
Whether to reuse matched parameters