Router
class Router
Class to create and parse routes
Constants
PROCESS_BEFORE |
Mask for the before process stage |
PROCESS_DURING |
Mask for the during process stage |
PROCESS_AFTER |
Mask for the after process stage |
Methods
__construct(
array $options = array())
Class constructor
static
Router
getInstance(
string $client,
array $options = array())
Returns the global Router object, only creating it if it doesn't already exist.
array
parse(
JUri $uri)
Function to convert a route to an internal URI
JUri
build(
string $url)
Function to convert an internal URI to a route
integer
getMode()
Get the router mode
void
setMode(
integer $mode)
Set the router mode
void
setVar(
string $key,
mixed $value,
boolean $create = true)
Set a router variable, creating it if it doesn't exist
void
setVars(
array $vars = array(),
boolean $merge = true)
Set the router variable array
mixed
getVar(
string $key)
Get a router variable
array
getVars()
Get the router variable array
void
attachBuildRule(
callable $callback,
string $stage = self::PROCESS_DURING)
Attach a build rule
void
attachParseRule(
callable $callback,
string $stage = self::PROCESS_DURING)
Attach a parse rule
Details
static
Router
getInstance(
string $client,
array $options = array())
Returns the global Router object, only creating it if it doesn't already exist.