SiteRouter
class SiteRouter extends Router
Class to create and parse routes for the site application
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(),
CMSApplication $app = null,
JMenu $menu = null)
Class constructor
static
Router
getInstance(
string $client,
array $options = array())
Returns the global Router object, only creating it if it doesn't already exist.
from Router
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
void
setVar(
string $key,
mixed $value,
boolean $create = true)
Set a router variable, creating it if it doesn't exist
from Router
void
setVars(
array $vars = array(),
boolean $merge = true)
Set the router variable array
from Router
void
attachBuildRule(
callable $callback,
string $stage = self::PROCESS_DURING)
Attach a build rule
from Router
void
attachParseRule(
callable $callback,
string $stage = self::PROCESS_DURING)
Attach a parse rule
from Router
getComponentRouter(
string $component)
Get component router
boolean
setComponentRouter(
string $component,
object $router)
Set a router for a component
Details
__construct(
array $options = array(),
CMSApplication $app = null,
JMenu $menu = null)
Class constructor
static
Router
getInstance(
string $client,
array $options = array())
Returns the global Router object, only creating it if it doesn't already exist.