Class to build frontend urls for advandced mod rewrite plugin.
Extends abstract Contenido_UriBuilder class and implements singleton pattern.
Usage:
cInclude('classes', 'uri/class.uriBuilder.MR.php'); $url = 'front_content.php?idart=123'; $mrUriBuilder = cUriBuilderMR::getInstance(); $mrUriBuilder->buildUrl(array($url)); $newUrl = $mrUriBuilder->getUrl();
todo | Add handling of absolute paths, standardize handling of fragments |
---|---|
author | Murat Purc |
package | CONTENIDO Plugins |
subpackage | ModRewrite |
buildUrl(array $params, boolean $bUseAbsolutePath) : string
Index keys of $aParams will be used as "a", corresponding values as "1" in this sample.
array
Parameter array, provides only following parameters:
$params[0] = 'front_content.php?idart=123...'
boolean
Flag to use absolute path (not used at the moment)
\cInvalidArgumentException |
---|
string
New build urlgetHttpBasePath() : string
http://contenido.org/
inherited_from | \cUriBuilder::getHttpBasePath() |
---|
string
getInstance() : \cUriBuilderMR
It is meant to be an abstract function but not declared as abstract, because PHP Strict Standards are against abstract static functions.
\cBadMethodCallException |
If child class has not implemented this function |
---|
getUrl() : string
inherited_from | \cUriBuilder::getUrl() |
---|
string
setHttpBasePath($sBasePath) : void
http://contenido.org/
inherited_from | \cUriBuilder::setHttpBasePath() |
---|
__construct()
_buildUrl(array $aParams) : string
array
Parameter array
string
New build pretty url_createUrlQueryPart(array $aArgs) : string
All non CONTENIDO related parameter will be excluded from composition.
array
Assoziative parameter array
string
Composed query part for the URL like
'?foo=bar¶m=value'_getArticleName(array $aPretty, array $aArgs) : string
array
Pretty url array
array
Additional arguments
string
Articlename_getClientParameter(array $aArgs) : mixed
array
Additional arguments
mixed
Client id, client name or null_getLanguageParameter(array $aArgs) : mixed
array
Additional arguments
mixed
Language id, language name or null_getPath(array $aPretty) : string
array
Pretty url array
string
Path$sHttpBasePath : string
http://contenido.org/
inherited_from | \cUriBuilder::$$sHttpBasePath |
---|
$sUrl : string
inherited_from | \cUriBuilder::$$sUrl |
---|
$_aMrCfg : array
$_bIsXHTML : bool
$_bMREnabled : bool
$_instance : \cUriBuilderMR
$_sAmp : string