RouterInterface

Component routing interface

since

3.3

package

Joomla CMS

Methods

build

Build method for URLs This method is meant to transform the query parameters into a more human readable form. It is only executed when SEF mode is switched on.

build(mixed||string|int &query) : mixed||string|int
since

3.3

Arguments

query

array<string|int, mixed>An array of URL arguments

Response

array<string|int, mixed>The URL arguments to use to assemble the subsequent URL.

parse

Parse method for URLs This method is meant to transform the human readable URL back into query parameters. It is only executed when SEF mode is switched on.

parse(mixed||string|int &segments) : mixed||string|int
since

3.3

Arguments

segments

array<string|int, mixed>The segments of the URL to parse.

Response

array<string|int, mixed>The URL attributes to be used by the application.

preprocess

Prepare-method for URLs This method is meant to validate and complete the URL parameters.

preprocess(mixed||string|int query) : mixed||string|int

For example it can add the Itemid or set a language parameter. This method is executed on each URL, regardless of SEF mode switched on or not.

since

3.3

Arguments

query

array<string|int, mixed>An associative array of URL arguments

Response

array<string|int, mixed>The URL arguments to use to assemble the subsequent URL.