VuFind API Documentation

Url extends Url
in package

Url view helper (extending core Laminas helper with additional functionality)

Tags
category

VuFind

author

Chris Hallberg challber@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

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
see
RouteInterface::assemble()
throws
RuntimeException

If no RouteStackInterface was provided

throws
RuntimeException

If no RouteMatch was provided

throws
RuntimeException

If RouteMatch didn't contain a matched route name

throws
InvalidArgumentException

If the params object was not an array or Traversable object.

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

Return values
string

Search results