Object that contains url data, and which provides static method helpers
| package |
jelix |
|---|---|
| subpackage |
core_url |
| author |
Laurent Jouanneau (for the original code from Copix and enhancement for jelix) |
| author |
Gerald Croes (for the original code from Copix) |
| contributor |
Loic Mathaud |
| contributor |
Thibault Piront (nuKs) |
__construct(string $scriptname = '', array $params = array(), string $pathInfo = '')
stringscript name
arrayparameters
stringpath info contents
__toString()
..
appendToUrlString(string $url, array $params = array(), boolean $forxml = false) : string
stringan URL
arraysome parameters to append to the url
booleanif true, escape some characters to include the url into an html/xml document
stringthe url
clearParam()
delParam(string $name)
stringparameter name
escape(string $str, boolean $highlevel = false) : string
.
stringthe string to escape
booleanfalse : just to a urlencode. true, replace some characters
stringescaped string
get(string $actSel, array $params = array(), integer $what) : mixed
stringaction selector. You can use # instead of the module or the action name, to specify the current url.
arrayassociative array with the parameters
integerthe format you want : one of the jUrl const, STRING XMLSTRING JURL JURLACTION
mixeda value, depending of the $what parameter
getCurrentUrl(boolean $forxml = false, $full = false) : string
The URL is the URL for the frontend HTTP server, if your app is behind a proxy.
booleanif true, escape some characters to include the url into an html/xml document
stringthe url
getFull(string $actSel, array $params = array(), integer $what, string $domainName = null) : string
| Throws |
|
|---|
stringaction selector. You can use # instead of the module or the action name, to specify the current url.
arrayassociative array with the parameters
integerthe format you want : only jUrl::STRING or jUrl::XMLSTRING
stringCustomized domain name
stringthe url string
getParam(string $name, string $defaultValue = null) : string
stringparameter name
stringthe default value returned if the parameter doesn't exists
stringthe value
getPath() : string
| since | 1.0.4 |
|---|---|
string
getQuery(boolean $forxml = false) : string
| since | 1.0.4 |
|---|
booleantrue: some characters will be escaped
string
getRootUrl(string $ressourceType) : string
stringName of the ressource
stringthe root URL corresponding to this ressource, or basePath if unknown
getRootUrlRessourceValue(string $ressourceType) : string
stringName of the ressource
stringthe config value of this value, null if it does not exist
parse(string $scriptNamePath, string $pathinfo, array $params) : \jUrlAction
string/path/index.php
stringthe path info of the url.
arrayurl parameter ($_REQUEST)
\jUrlAction
setParam(string $name, string $value)
stringparameter name
stringparameter value
toString(boolean $forxml = false) : string
booleantrue: some characters will be escaped
string
unescape(string $str) : string
stringthe string to escape
string
STRING
XMLSTRING
JURL
JURLACTION
scriptName : string
| var |
|---|
string
pathInfo : string
| var |
|---|
string
params :