public
|
#
__construct( array $options = array() )
Class constructor
Parameters
- $options
array - $options Array of options
Since
1.5
|
public static
JRouter
|
#
getInstance( string $client, array $options = array() )
Returns the global JRouter object, only creating it if it doesn't already
exist.
Returns the global JRouter object, only creating it if it doesn't already
exist.
Parameters
- $client
string - $client The name of the client
- $options
array - $options An associative array of options
Returns
Throws
Since
1.5
|
public
array
|
#
parse( JUri & $uri )
Function to convert a route to an internal URI
Function to convert a route to an internal URI
Parameters
- $uri
JUri - &$uri The uri.
Returns
array
Since
1.5
|
public
JUri
|
#
build( string $url )
Function to convert an internal URI to a route
Function to convert an internal URI to a route
Parameters
- $url
string - $url The internal URL or an associative array
Returns
JUri
- The absolute search engine friendly URL object
Since
1.5
|
public
integer
|
#
getMode( )
Get the router mode
Deprecated
4.0
Returns
integer
Since
1.5
|
public
|
#
setMode( integer $mode )
Set the router mode
Deprecated
4.0
Parameters
- $mode
integer - $mode The routing mode.
Since
1.5
|
public
|
#
setVar( string $key, mixed $value, boolean $create = true )
Set a router variable, creating it if it doesn't exist
Set a router variable, creating it if it doesn't exist
Parameters
- $key
string - $key The name of the variable
- $value
mixed - $value The value of the variable
- $create
boolean - $create If True, the variable will be created if it doesn't exist yet
Since
1.5
|
public
|
#
setVars( array $vars = array(), boolean $merge = true )
Set the router variable array
Set the router variable array
Parameters
- $vars
array - $vars An associative array with variables
- $merge
boolean - $merge If True, the array will be merged instead of overwritten
Since
1.5
|
public
mixed
|
#
getVar( string $key )
Get a router variable
Parameters
- $key
string - $key The name of the variable
Returns
mixed - Value of the variable
Since
1.5
|
public
array
|
#
getVars( )
Get the router variable array
Get the router variable array
Returns
array - An associative array of router variables
Since
1.5
|
public
|
#
attachBuildRule( callable $callback, string $stage = JRouter::PROCESS_DURING )
Attach a build rule
Parameters
- $callback
callable - $callback The function to be called
- $stage
string - $stage The stage of the build process that this should be added to. Possible
values: 'preprocess', '' for the main build process, 'postprocess'
Since
1.5
|
public
|
#
attachParseRule( callable $callback, string $stage = JRouter::PROCESS_DURING )
Attach a parse rule
Parameters
- $callback
callable - $callback The function to be called.
- $stage
string - $stage The stage of the parse process that this should be added to. Possible
values: 'preprocess', '' for the main parse process, 'postprocess'
Since
1.5
|
protected
boolean
|
#
_parseRawRoute( JUri & $uri )
Function to convert a raw route to an internal URI
Function to convert a raw route to an internal URI
Deprecated
4.0 Attach your logic as rule to the main parse stage
Parameters
- $uri
JUri - &$uri The raw route
Returns
boolean
Since
1.5
|
protected
array
|
#
parseRawRoute( JUri & $uri )
Function to convert a raw route to an internal URI
Function to convert a raw route to an internal URI
Deprecated
4.0 Attach your logic as rule to the main parse stage
Parameters
- $uri
JUri - &$uri The raw route
Returns
array - Array of variables
Since
3.2
|
protected
string
|
#
_parseSefRoute( JUri & $uri )
Function to convert a sef route to an internal URI
Function to convert a sef route to an internal URI
Deprecated
4.0 Attach your logic as rule to the main parse stage
Parameters
- $uri
JUri - &$uri The sef URI
Returns
string - Internal URI
Since
1.5
|
protected
array
|
#
parseSefRoute( JUri & $uri )
Function to convert a sef route to an internal URI
Function to convert a sef route to an internal URI
Deprecated
4.0 Attach your logic as rule to the main parse stage
Parameters
- $uri
JUri - &$uri The sef URI
Returns
array - Array of variables
Since
3.2
|
protected
string
|
#
_buildRawRoute( JUri & $uri )
Function to build a raw route
Function to build a raw route
Deprecated
4.0 Attach your logic as rule to the main build stage
Parameters
- $uri
JUri - &$uri The internal URL
Returns
string - Raw Route
Since
1.5
|
protected
string
|
#
buildRawRoute( JUri & $uri )
Function to build a raw route
Function to build a raw route
Deprecated
4.0 Attach your logic as rule to the main build stage
Parameters
- $uri
JUri - &$uri The internal URL
Returns
string - Raw Route
Since
3.2
|
protected
string
|
#
_buildSefRoute( JUri & $uri )
Function to build a sef route
Function to build a sef route
Deprecated
4.0 Attach your logic as rule to the main build stage
Parameters
- $uri
JUri - &$uri The uri
Returns
string - The SEF route
Since
1.5
|
protected
string
|
#
buildSefRoute( JUri & $uri )
Function to build a sef route
Function to build a sef route
Deprecated
4.0 Attach your logic as rule to the main build stage
Parameters
- $uri
JUri - &$uri The uri
Returns
string - The SEF route
Since
3.2
|
protected
array
|
#
_processParseRules( JUri & $uri )
Process the parsed router variables based on custom defined rules
Process the parsed router variables based on custom defined rules
Deprecated
4.0 Use processParseRules() instead
Parameters
- $uri
JUri - &$uri The URI to parse
Returns
array - The array of processed URI variables
Since
1.5
|
protected
array
|
#
processParseRules( JUri & $uri, string $stage = JRouter::PROCESS_DURING )
Process the parsed router variables based on custom defined rules
Process the parsed router variables based on custom defined rules
Parameters
- $uri
JUri - &$uri The URI to parse
- $stage
string - $stage The stage that should be processed. Possible values: 'preprocess',
'postprocess' and '' for the main parse stage
Returns
array - The array of processed URI variables
Since
3.2
|
protected
|
#
_processBuildRules( JUri & $uri )
Process the build uri query data based on custom defined rules
Process the build uri query data based on custom defined rules
Deprecated
4.0 Use processBuildRules() instead
Parameters
- $uri
JUri - &$uri The URI
Since
1.5
|
protected
|
#
processBuildRules( JUri & $uri, string $stage = JRouter::PROCESS_DURING )
Process the build uri query data based on custom defined rules
Process the build uri query data based on custom defined rules
Parameters
- $uri
JUri - &$uri The URI
- $stage
string - $stage The stage that should be processed. Possible values: 'preprocess',
'postprocess' and '' for the main build stage
Since
3.2
|
protected
JUri
|
#
_createUri( string $url )
Create a uri based on a full or partial URL string
Create a uri based on a full or partial URL string
Deprecated
4.0 Use createUri() instead
Parameters
- $url
string - $url The URI
Returns
Since
1.5
CodeCoverageIgnore
|
protected
JUri
|
#
createUri( string $url )
Create a uri based on a full or partial URL string
Create a uri based on a full or partial URL string
Parameters
- $url
string - $url The URI or an associative array
Returns
Since
3.2
|
protected
array
|
#
_encodeSegments( array $segments )
Encode route segments
Deprecated
4.0 This should be performed in the component router instead
Parameters
- $segments
array - $segments An array of route segments
Returns
array - Array of encoded route segments
Since
1.5
CodeCoverageIgnore
|
protected
array
|
#
encodeSegments( array $segments )
Encode route segments
Deprecated
4.0 This should be performed in the component router instead
Parameters
- $segments
array - $segments An array of route segments
Returns
array - Array of encoded route segments
Since
3.2
|
protected
array
|
#
_decodeSegments( array $segments )
Decode route segments
Deprecated
4.0 This should be performed in the component router instead
Parameters
- $segments
array - $segments An array of route segments
Returns
array - Array of decoded route segments
Since
1.5
CodeCoverageIgnore
|
protected
array
|
#
decodeSegments( array $segments )
Decode route segments
Deprecated
4.0 This should be performed in the component router instead
Parameters
- $segments
array - $segments An array of route segments
Returns
array - Array of decoded route segments
Since
3.2
|