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.
arrayParameter array, provides only following parameters:
$params[0] = 'front_content.php?idart=123...'
booleanFlag to use absolute path (not used at the moment)
\cInvalidArgumentException |
|---|
stringNew build urlgetHttpBasePath() : string
http://contenido.org/
| inherited_from | \cUriBuilder::getHttpBasePath() |
|---|
stringgetInstance() : \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() |
|---|
stringsetHttpBasePath($sBasePath) : void
http://contenido.org/
| inherited_from | \cUriBuilder::setHttpBasePath() |
|---|
__construct()
_buildUrl(array $aParams) : string
arrayParameter array
stringNew build pretty url_createUrlQueryPart(array $aArgs) : string
All non CONTENIDO related parameter will be excluded from composition.
arrayAssoziative parameter array
stringComposed query part for the URL like
'?foo=bar¶m=value'_getArticleName(array $aPretty, array $aArgs) : string
arrayPretty url array
arrayAdditional arguments
stringArticlename_getClientParameter(array $aArgs) : mixed
arrayAdditional arguments
mixedClient id, client name or null_getLanguageParameter(array $aArgs) : mixed
arrayAdditional arguments
mixedLanguage id, language name or null_getPath(array $aPretty) : string
arrayPretty url array
stringPath$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