Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
parse (&$uri, $setVars=false) | |
build ($url) | |
setVar ($key, $value, $create=true) | |
setVars ($vars=array(), $merge=true) | |
getVar ($key) | |
getVars () | |
attachBuildRule (callable $callback, $stage=self::PROCESS_DURING) | |
attachParseRule (callable $callback, $stage=self::PROCESS_DURING) | |
detachRule ($type, $rule, $stage=self::PROCESS_DURING) | |
getRules () | |
Fonctions membres publiques statiques | |
static | getInstance ($client, $options=array()) |
Champs de données | |
const | PROCESS_BEFORE = 'preprocess' |
const | PROCESS_DURING = '' |
const | PROCESS_AFTER = 'postprocess' |
Fonctions membres protégées | |
processParseRules (&$uri, $stage=self::PROCESS_DURING) | |
processBuildRules (&$uri, $stage=self::PROCESS_DURING) | |
createUri ($url) | |
Attributs protégés | |
$vars = array() | |
$rules | |
$cache = array() | |
Attributs protégés statiques | |
static | $instances = array() |
Class to create and parse routes
attachBuildRule | ( | callable | $callback, |
$stage = self::PROCESS_DURING |
|||
) |
Attach a build rule
callable | $callback | The function to be called |
string | $stage | The stage of the build process that this should be added to. Possible values: 'preprocess', '' for the main build process, 'postprocess' |
attachParseRule | ( | callable | $callback, |
$stage = self::PROCESS_DURING |
|||
) |
Attach a parse rule
callable | $callback | The function to be called. |
string | $stage | The stage of the parse process that this should be added to. Possible values: 'preprocess', '' for the main parse process, 'postprocess' |
build | ( | $url | ) |
|
protected |
detachRule | ( | $type, | |
$rule, | |||
$stage = self::PROCESS_DURING |
|||
) |
Remove a rule
string | $type | Type of rule to remove (parse or build) |
callable | $rule | The rule to be removed. |
string | $stage | The stage of the parse process that this should be added to. Possible values: 'preprocess', '' for the main parse process, 'postprocess' |
|
static |
Returns the global Router object, only creating it if it doesn't already exist.
string | $client | The name of the client |
array | $options | An associative array of options |
Références $client, Factory\getContainer(), Symfony\Contracts\Service\has(), et Text\sprintf().
Référencé par ConsoleApplication\getRouter(), et CMSApplication\getRouter().
getRules | ( | ) |
Get all currently attached rules
getVar | ( | $key | ) |
getVars | ( | ) |
Get the router variable array
parse | ( | & | $uri, |
$setVars = false |
|||
) |
|
protected |
|
protected |
setVar | ( | $key, | |
$value, | |||
$create = true |
|||
) |
setVars | ( | $vars = array() , |
|
$merge = true |
|||
) |
Set the router variable array
array | $vars | An associative array with variables |
boolean | $merge | If True, the array will be merged instead of overwritten |
|
protected |
|
staticprotected |
|
protected |
|
protected |
const PROCESS_AFTER = 'postprocess' |
const PROCESS_BEFORE = 'preprocess' |
const PROCESS_DURING = '' |