interface RulesInterface

RouterRules interface for Joomla

Methods

void
preprocess( array $query)

Prepares a query set to be handed over to the build() method.

void
parse( array $segments, array $vars)

Parses a URI to retrieve informations for the right route through the component.

void
build( array $query, array $segments)

Builds URI segments from a query to encode the necessary informations for a route in a human-readable URL.

Details

void preprocess( array $query)

Prepares a query set to be handed over to the build() method.

This should complete a partial query set to work as a complete non-SEFed URL and in general make sure that all information is present and properly formatted. For example, the Itemid should be retrieved and set here.

Parameters

array $query &$query The query array to process

Return Value

void

void parse( array $segments, array $vars)

Parses a URI to retrieve informations for the right route through the component.

This method should retrieve all its input from its method arguments.

Parameters

array $segments &$segments The URL segments to parse
array $vars &$vars The vars that result from the segments

Return Value

void

void build( array $query, array $segments)

Builds URI segments from a query to encode the necessary informations for a route in a human-readable URL.

This method should retrieve all its input from its method arguments.

Parameters

array $query &$query The vars that should be converted
array $segments &$segments The URL segments to create

Return Value

void