Public Member Functions | |
| __construct ($url= '') | |
| __get ($name) | |
| __set ($name, $value) | |
| relayCurrentContext () | |
| relayContext ($context) | |
| addParamList ($paramList, $overwrite=false) | |
| addParam ($name, $value) | |
| replaceParam ($name, $value, $addIfMissing=false) | |
| removeParam ($name, $ignoreMissing=false) | |
| toUrl () | |
| __toString () | |
Static Public Member Functions | |
| static | Contextualize ($url, $context=null) |
Protected Attributes | |
| $url | |
Class to manipulate Urls
Definition at line 20 of file url.lib.php.
| __construct | ( | $ | url = '' |
) |
Constructor
| string | url base url (use PHP_SELF if missing) |
Definition at line 38 of file url.lib.php.
| __get | ( | $ | name | ) |
Definition at line 62 of file url.lib.php.
| __set | ( | $ | name, | |
| $ | value | |||
| ) |
Definition at line 74 of file url.lib.php.
| __toString | ( | ) |
| addParam | ( | $ | name, | |
| $ | value | |||
| ) |
Add one parameter to the current url
| string | $name parameter name | |
| string | $value parameter value |
Definition at line 154 of file url.lib.php.
| addParamList | ( | $ | paramList, | |
| $ | overwrite = false | |||
| ) |
Add a list of parameters to the current url
| array | $paramList associative array of parameters name=>value | |
| boolean | $overwrite will overwrite the value of an existing parameter if set to true |
Definition at line 128 of file url.lib.php.
| static Contextualize | ( | $ | url, | |
| $ | context = null | |||
| ) | [static] |
Add current execution context to the given URL
| string | $url | |
| array | $context |
Definition at line 289 of file url.lib.php.
| relayContext | ( | $ | context | ) |
Relay given Url context in urls
| array | context |
Definition at line 114 of file url.lib.php.
| relayCurrentContext | ( | ) |
Relay Claroline current Url context in urls
Definition at line 86 of file url.lib.php.
| removeParam | ( | $ | name, | |
| $ | ignoreMissing = false | |||
| ) |
Remove the given parameter
| string | $name parameter name | |
| boolean | $ignoreMissing if set to true, the method invokation will ignore a missing parameter. If set to false (default) removing a non existent parameter will generate an exception |
| Exception | if trying to remove a non existent parameter with $ignoreMissing set to false (default) |
Definition at line 196 of file url.lib.php.
| replaceParam | ( | $ | name, | |
| $ | value, | |||
| $ | addIfMissing = false | |||
| ) |
Replace the value of the given parameter with the given value
| string | $name parameter name | |
| string | $value parameter value | |
| boolean | $addIfMissing add the parameter if missing (default false) |
| Exception | if trying to modify a non existent parameter with $addIfMissing set to false (default) |
Definition at line 173 of file url.lib.php.
| toUrl | ( | ) |
Convert the current Url object to an URL string
Definition at line 218 of file url.lib.php.
$url [protected] |
array(
'scheme' => '',
'host' => '',
'port' => '',
'user' => '',
'pass' => '',
'path' => '',
'query' => array(),
'fragment' => ''
)
Definition at line 22 of file url.lib.php.
1.6.3