Returns the global JRouter object, only creating it if it doesn't already exist.
static
JRouter
getInstance
(
string $client, [
array $options =
array()])
-
string
$client: The name of the client
-
array
$options: An associative array of options
Class constructor
JRouter
__construct
([array $options = array()])
-
array
$options: Array of options
Attach a build rule
void
attachBuildRule
(callback $callback)
-
callback
$callback: The function to be called
Attach a parse rule
void
attachParseRule
(callback $callback)
-
callback
$callback: The function to be called.
Function to convert an internal URI to a route
string
build
(string $url)
-
string
$url: The internal URL
Redefined in descendants as:
Function to build a raw route
string
buildRawRoute
(
JUri &$uri)
-
JUri
&$uri: The internal URL
Function to build a sef route
string
buildSefRoute
(
JUri &$uri)
Redefined in descendants as:
Create a uri based on a full or partial url string
JUri
createURI
(
string $url)
Redefined in descendants as:
Decode route segments
array
decodeSegments
(array $segments)
-
array
$segments: An array of route segments
Encode route segments
array
encodeSegments
(array $segments)
-
array
$segments: An array of route segments
Get the router mode
integer
getMode
()
Get a router variable
mixed
getVar
(string $key)
-
string
$key: The name of the variable
Get the router variable array
array
getVars
()
Function to convert a route to an internal URI
Redefined in descendants as:
Function to convert a raw route to an internal URI
boolean
parseRawRoute
(
JUri &$uri)
-
JUri
&$uri: The raw route
Redefined in descendants as:
Function to convert a sef route to an internal URI
string
parseSefRoute
(
JUri &$uri)
Redefined in descendants as:
Process the build uri query data based on custom defined rules
void
processBuildRules
(
JUri &$uri)
Redefined in descendants as:
Process the parsed router variables based on custom defined rules
array
processParseRules
(
JUri &$uri)
-
JUri
&$uri: The URI to parse
Redefined in descendants as:
Set the router mode
void
setMode
(integer $mode)
-
integer
$mode: The routing mode.
Set a router variable, creating it if it doesn't exist
void
setVar
(string $key, mixed $value, [boolean $create = true])
-
string
$key: The name of the variable
-
mixed
$value: The value of the variable
-
boolean
$create: If True, the variable will be created if it doesn't exist yet
Set the router variable array
void
setVars
([array $vars = array()], [boolean $merge = true])
-
array
$vars: An associative array with variables
-
boolean
$merge: If True, the array will be merged instead of overwritten
Function to build a raw route
string
_buildRawRoute
(
JUri &$uri)
-
JUri
&$uri: The internal URL
Function to build a sef route
string
_buildSefRoute
(
JUri &$uri)
Redefined in descendants as:
Create a uri based on a full or partial url string
JUri
_createURI
(
string $url)
Decode route segments
array
_decodeSegments
(array $segments)
-
array
$segments: An array of route segments
Encode route segments
array
_encodeSegments
(array $segments)
-
array
$segments: An array of route segments
Function to convert a raw route to an internal URI
boolean
_parseRawRoute
(
JUri &$uri)
-
JUri
&$uri: The raw route
Function to convert a sef route to an internal URI
string
_parseSefRoute
(
JUri &$uri)
Process the build uri query data based on custom defined rules
void
_processBuildRules
(
JUri &$uri)
Process the parsed router variables based on custom defined rules
array
_processParseRules
(
JUri &$uri)
-
JUri
&$uri: The URI to parse