Class to create websafe names, it also provides several helper functions
Provides some common features such as common debugging, globals/configuration access for childs.
| author | Stefan Seifarth / stese |
|---|---|
| author | Murat Purc |
| package | plugin |
| subpackage | Mod Rewrite |
buildRecursivPath(int $iCatId, int $iLangId, int $iLastId) : string
intLatest category id
intLanguage id
intLast category id
stringlinkpath with correct uriclientIdExists(int $clientId) : bool
int
boolcontenidoHtmlAnchor(array $aMatches, bool $bXHTML) : string
array[0] = complete anchor, [1] = pre arguments, [2] = anchor name, [3] = post arguments
boolFlag to return XHTML valid url
stringNew anchorgetArtIdByArtlangId(int $iArtlangId) : array
intCurrent article id
arrayArray with idart and idlang of current articlegetArtIdByWebsafeName(string $sArtName, int $iCatId, int $iLangId) : int | null
stringWebsafe name
intCategory id
intLanguage id
intnullRecent article id or nullgetArtIds(int $iArtlangId) : array
intidartlang
arrayUrlname, idlang of empty arraygetArtLangWebsafeName(int $iArtLangId) : string
intidartlang
stringArticle websafe namegetArtTitle(int $iArtId, int $iLangId) : string
| NOTE | : seems to be not used??? |
|---|
intArticle id
intLanguage id
stringArticle namegetArtWebsafeName(int $iArtId, int $iLangId) : string
intArticle id
intLanguage id
stringArticle websafe namegetCatIdByUrlPath(string $path) : int
Caches the paths at first call to provode faster processing at further calls.
stringCategory path
intCategory idgetCatLanguages(int $iCatId) : array
intCategory id
arrayUsed language idsgetCatName(int $iCatId, int $iLangId) : string
intCategory id
intLanguage id
stringCategory namegetClientFullUrlParts(string $url) : array
Example: input = http://host/front_content.php?idcat=123 return = array('htmlpath' => 'http://host', 'url' => 'front_content.php?idcat=123')
stringURL to split
arrayAssoziative array including the two parts:
- array('htmlpath' => $path, 'url' => $url)getClientId(string $sClientName) : int
stringClient name
intClient idgetClientName(int $clientId) : string
intClient id
stringClient namegetConfig(string $key, mixed $default) : mixed
| inherited_from | \ModRewriteBase::getConfig() |
|---|
stringName of configuration key
mixedDefault value to return as a fallback
mixedDesired value mr configuration, either the full configuration
or one of the desired subpartgetHtaccessInfo() : array
arraygetIdFromPathresolverResult(array $results) : mixed
Error site handling if category not found
if percentage == 100 and there is no 100 percentage result value, error site will be shown - can be adjust by user settings for smooth similar effects - 80 to 95 will be best but have to check by user
| deprecated | Is no more used |
|---|
arrayPathresolver results array
mixedCategoryid or falsegetLanguageId(string $sLanguageName, int $iClientId) : int
stringLanguage name
intClient id
intLanguage idgetLanguageName(int $languageId) : string
intLanguage id
stringLanuage nameinitialize(int $clientId)
Loads configuration of passed client and sets some properties.
intClient id
isEnabled() : bool
| inherited_from | \ModRewriteBase::isEnabled() |
|---|
boolisInCatArticles(string $sName, int $iArtId, int $iLangId, int $iCatId) : bool
Check all articles in the current category on existing same websafe name.
stringWebsafe name to check
intCurrent article id
intCurrent language id
intCategory id
boolTrue if websafename already exists, false if notisInCategories(string $sName, int $iCatId, int $iLangId) : bool
Check all categories in the main parent category on existing same websafe name
stringWebsafe name to check
intCurrent category id
intCurrent language id
boolTrue if websafename already exists, false if notlanguageIdExists(int $languageId) : bool
intLanguage id
boolrecreateAliases(bool $bOnlyEmpty)
Shortcut to recreateCategoriesAliases() and recreateArticlesAliases()
boolFlag to reset only empty items
recreateArticlesAliases(bool $bOnlyEmpty)
boolFlag to reset only empty items
recreateCategoriesAliases(bool $bOnlyEmpty)
boolFlag to reset only empty items
resetAliases()
Shortcut to recreateCategoriesAliases() and recreateArticlesAliases()
resetArticlesAliases()
Clears all urlname entries in art_lang table, and sets the value for all existing entries.
| deprecated | see ModRewrite::recreateArticlesAliases(); |
|---|
resetCategoriesAliases()
Clears all urlname entries in cat_lang table, and sets the value for all existing entries.
| deprecated | see ModRewrite::recreateCategoriesAliases(); |
|---|
rewriteHtmlAnchor(array $aMatches) : string
array[0] = complete anchor, [1] = pre arguments, [2] = anchor name, [3] = post arguments
stringNew anchorsetArtWebsafeName(string $sName, int $iArtId, int $iLangId, int $iCatId) : bool
Insert new websafe name in article list
stringOriginal name (will be converted)
intCurrent article id
intCurrent language id
intCategory id
boolTrue if insert was successfullysetCatUrlPath(int $iCatId, int $iLangId) : bool
intCategory id
intLanguage id
boolTrue if insert was successfullysetCatWebsafeName(string $sName, int $iCatId, int $iLangId) : bool
Insert new websafe name in category list.
stringOriginal name (will be converted) or alias
intCategory id
intLanguage id
boolTrue if insert was successfullysetConfig(string $key, mixed $value)
| inherited_from | \ModRewriteBase::setConfig() |
|---|
stringName of configuration key
mixedThe value to set
setEnabled(bool $bEnabled)
| inherited_from | \ModRewriteBase::setEnabled() |
|---|
bool
urlPreClean(string $url) : string
Removes absolute path declaration '/front_content.php' or relative path definition to actual dir './front_content.php', ampersand entities '&' and returns a url like 'front_content.php?idart=12&idlang=1'
stringUrl to clean
stringCleaned Url$_lookupTable : array
$_db : \cDb