Methods summary
public static
|
#
initialize( integer $clientId )
Initialization, is to call at least once, also possible to call multible
times, if different client configuration is to load.
Initialization, is to call at least once, also possible to call multible
times, if different client configuration is to load.
Loads configuration of passed client and sets some properties.
Parameters
- $clientId
integer $clientId Client id
Throws
|
public static
boolean
|
#
isInCategories( string $sName = '', integer $iCatId = 0, integer $iLangId = 0 )
Check categories on websafe name
Check categories on websafe name
Check all categories in the main parent category on existing same websafe
name
Parameters
- $sName
string $sName Websafe name to check
- $iCatId
integer $iCatId Current category id
- $iLangId
integer $iLangId Current language id
Returns
boolean True if websafename already exists, false if not
Throws
|
public static
boolean
|
#
isInCatArticles( string $sName = '', integer $iArtId = 0, integer $iLangId = 0, integer $iCatId = 0 )
Check articles on websafe name.
Check articles on websafe name.
Check all articles in the current category on existing same websafe name.
Parameters
- $sName
string $sName Websafe name to check
- $iArtId
integer $iArtId Current article id
- $iLangId
integer $iLangId Current language id
- $iCatId
integer $iCatId Category id
Returns
boolean True if websafename already exists, false if not
Throws
|
public static
boolean
|
#
setArtWebsafeName( string $sName = '', integer $iArtId = 0, integer $iLangId = 0, integer $iCatId = 0 )
Set websafe name in article list.
Set websafe name in article list.
Insert new websafe name in article list
Parameters
- $sName
string $sName Original name (will be converted)
- $iArtId
integer $iArtId Current article id
- $iLangId
integer $iLangId Current language id
- $iCatId
integer $iCatId Category id
Returns
boolean True if insert was successfully
Throws
|
public static
boolean
|
#
setCatWebsafeName( string $sName = '', integer $iCatId = 0, integer $iLangId = 0 )
Set websafe name in category list.
Set websafe name in category list.
Insert new websafe name in category list.
Parameters
- $sName
string $sName Original name (will be converted) or alias
- $iCatId
integer $iCatId Category id
- $iLangId
integer $iLangId Language id
Returns
boolean True if insert was successfully
Throws
|
public static
boolean
|
#
setCatUrlPath( integer $iCatId = 0, integer $iLangId = 0 )
Set urlpath of category
Parameters
- $iCatId
integer $iCatId Category id
- $iLangId
integer $iLangId Language id
Returns
boolean True if insert was successfully
Throws
|
public static
array
|
#
getArtIdByArtlangId( integer $iArtlangId = 0 )
Get article id and language id from article language id
Get article id and language id from article language id
Parameters
- $iArtlangId
integer $iArtlangId Current article id
Returns
array Array with idart and idlang of current article
Throws
|
public static
integer|null
|
#
getArtIdByWebsafeName( string $sArtName = '', integer $iCatId = 0, integer $iLangId = 0 )
Get article id by article websafe name
Get article id by article websafe name
Parameters
- $sArtName
string $sArtName Websafe name
- $iCatId
integer $iCatId Category id
- $iLangId
integer $iLangId Language id
Returns
integer|null Recent article id or NULL
Throws
|
public static
string
|
#
getCatName( integer $iCatId = 0, integer $iLangId = 0 )
Get category name from category id and language id.
Get category name from category id and language id.
Parameters
- $iCatId
integer $iCatId Category id
- $iLangId
integer $iLangId Language id
Returns
string Category name
Throws
|
public static
integer
|
#
getCatIdByUrlPath( string $path )
Funcion to return cat id by path.
Funcion to return cat id by path.
Caches the paths at first call to provode faster processing at further
calls.
Parameters
- $path
string $path Category path
Returns
integer Category id
Throws
|
public static
string
|
#
getArtTitle( integer $iArtId = 0, integer $iLangId = 0 )
Get article name from article id and language id
Get article name from article id and language id
Parameters
- $iArtId
integer $iArtId Article id
- $iLangId
integer $iLangId Language id
Returns
string Article name
Throws
NOTE:
seems to be not used???
|
public static
array
|
#
getCatLanguages( integer $iCatId = 0 )
Get language ids from category id
Get language ids from category id
Parameters
- $iCatId
integer $iCatId Category id
Returns
array Used language ids
Throws
|
public static
array
|
#
getArtIds( integer $iArtlangId = 0 )
Get article urlname and language id
Get article urlname and language id
Parameters
- $iArtlangId
integer $iArtlangId idartlang
Returns
array Urlname, idlang of empty array
Throws
|
public static
string
|
#
buildRecursivPath( integer $iCatId = 0, integer $iLangId = 0, integer $iLastId = 0 )
Build a recursiv path for mod_rewrite rule like server directories
(dir1/dir2/dir3)
Build a recursiv path for mod_rewrite rule like server directories
(dir1/dir2/dir3)
Parameters
- $iCatId
integer $iCatId Latest category id
- $iLangId
integer $iLangId Language id
- $iLastId
integer $iLastId Last category id
Returns
string linkpath with correct uri
Throws
|
public static
string
|
#
rewriteHtmlAnchor( array $aMatches = [] )
Return full CONTENIDO url from single anchor
Return full CONTENIDO url from single anchor
Parameters
- $aMatches
array $aMatches [0] = complete anchor, [1] = pre arguments, [2] = anchor name, [3] =
post arguments
Returns
string New anchor
|
public static
string
|
#
contenidoHtmlAnchor( array $aMatches = [], boolean $bXHTML = true )
Return full CONTENIDO url from single anchor
Return full CONTENIDO url from single anchor
Parameters
- $aMatches
array $aMatches [0] = complete anchor, [1] = pre arguments, [2] = anchor name, [3] =
post arguments
- $bXHTML
boolean $bXHTML Flag to return XHTML valid url
Returns
string New anchor
|
public static
string
|
#
getArtWebsafeName( integer $iArtId = 0, integer $iLangId = 0 )
Get article websafe name from article id and language id.
Get article websafe name from article id and language id.
Parameters
- $iArtId
integer $iArtId Article id
- $iLangId
integer $iLangId Language id
Returns
string Article websafe name
Throws
|
public static
string
|
#
getArtLangWebsafeName( integer $iArtLangId = 0 )
Get article websafe name from idartlang.
Get article websafe name from idartlang.
Parameters
- $iArtLangId
integer $iArtLangId idartlang
Returns
string Article websafe name
Throws
|
public static
string
|
#
getClientName( integer $clientId = 0 )
Get name of client by id.
Get name of client by id.
Parameters
- $clientId
integer $clientId Client id
Returns
string Client name
Throws
|
public static
integer
|
#
getClientId( string $sClientName = '' )
Get client id from client name
Get client id from client name
Parameters
- $sClientName
string $sClientName Client name
Returns
integer Client id
Throws
|
public static
boolean
|
#
clientIdExists( integer $clientId )
Checks if client id exists
Checks if client id exists
Parameters
- $clientId
integer $clientId
Returns
boolean
Throws
|
public static
string
|
#
getLanguageName( integer $languageId = 0 )
Returns name of language by id.
Returns name of language by id.
Parameters
- $languageId
integer $languageId Language id
Returns
string Lanuage name
Throws
|
public static
boolean
|
#
languageIdExists( integer $languageId )
Checks if language id exists
Checks if language id exists
Parameters
- $languageId
integer $languageId Language id
Returns
boolean
Throws
|
public static
integer
|
#
getLanguageId( string $sLanguageName = '', integer $iClientId = 1 )
Get language id from language name thanks to Nicolas Dickinson for multi
Client/Language BugFix
Get language id from language name thanks to Nicolas Dickinson for multi
Client/Language BugFix
Parameters
- $sLanguageName
string $sLanguageName Language name
- $iClientId
integer $iClientId Client id
Returns
integer Language id
Throws
|
public static
array
|
#
getClientFullUrlParts( string $url )
Splits passed argument into scheme://host and path/query.
Splits passed argument into scheme://host and path/query.
Example: input = http://host/front_content.php?idcat=123
return = ['htmlpath' => 'http://host', 'url' =>
'front_content.php?idcat=123']
Parameters
- $url
string $url URL to split
Returns
array Assoziative array including the two parts: - ['htmlpath' => $path, 'url'
=> $url]
|
public static
string
|
#
urlPreClean( string $url )
Function to preclean a url.
Function to preclean a url.
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'
Parameters
- $url
string $url Url to clean
Returns
string Cleaned Url
|
public static
|
#
recreateCategoriesAliases( boolean $bOnlyEmpty = false )
Recreates all or only empty aliases in categories table.
Recreates all or only empty aliases in categories table.
Parameters
- $bOnlyEmpty
boolean $bOnlyEmpty Flag to reset only empty items
Throws
|
public static
array|integer
|
#
getEmptyCategoriesAliases( boolean $bOnlyNumber = true )
Returns list of all empty category aliases
Returns list of all empty category aliases
Parameters
- $bOnlyNumber
boolean $bOnlyNumber
Returns
array|integer
Throws
|
public static
|
#
recreateArticlesAliases( boolean $bOnlyEmpty = false )
Recreates all or only empty urlname entries in art_lang table.
Recreates all or only empty urlname entries in art_lang table.
Parameters
- $bOnlyEmpty
boolean $bOnlyEmpty Flag to reset only empty items
Throws
|
public static
array|integer
|
#
getEmptyArticlesAliases( boolean $bOnlyNumber = true )
Returns list of all empty article aliases
Returns list of all empty article aliases
Parameters
- $bOnlyNumber
boolean $bOnlyNumber
Returns
array|integer
Throws
|
public static
|
#
resetAliases( )
Method to reset all aliases (categories and articles). Shortcut to
recreateCategoriesAliases() and recreateArticlesAliases()
Method to reset all aliases (categories and articles). Shortcut to
recreateCategoriesAliases() and recreateArticlesAliases()
Throws
|
public static
|
#
recreateAliases( boolean $bOnlyEmpty = false )
Recreate all or only empty aliases (categories and articles).
Recreate all or only empty aliases (categories and articles).
Shortcut to recreateCategoriesAliases() and recreateArticlesAliases()
Parameters
- $bOnlyEmpty
boolean $bOnlyEmpty Flag to reset only empty items
Throws
|
public static
array
|
#
getHtaccessInfo( )
Returns .htaccess related assoziative info array
Returns .htaccess related assoziative info array
Returns
array
|