

Public Member Functions | |
| __construct () | |
| encodeString ($sString) | |
| setSeparator ($sSeparator=null) | |
| setPrefix ($sPrefix) | |
| setIdLength ($iIdlength=null) | |
| setReservedWords ($aReservedWords) | |
| markAsExpired ($sId, $iShopId=null, $iLang=null, $sParams=null) | |
| encodeStaticUrls ($aStaticUrl, $iShopId, $iLang) | |
| copyStaticUrls ($iShopId) | |
| getStaticUrl ($sStdUrl, $iLang=null, $iShopId=null) | |
| addSeoEntry ($sObjectId, $iShopId, $iLang, $sStdUrl, $sSeoUrl, $sType, $blFixed=1, $sKeywords= '', $sDescription= '', $sParams= '') | |
| deleteSeoEntry ($sObjectId, $iShopId, $iLang, $sType) | |
| getMetaData ($sObjectId, $sMetaType, $iShopId=null, $iLang=null) | |
| getDynamicUrl ($sStdUrl, $sSeoUrl, $iLang) | |
Static Public Member Functions | |
| static | getInstance () |
Protected Member Functions | |
| _copyToHistory ($sId, $iShopId, $iLang, $sType=null, $sNewId=null) | |
| _getAddParams () | |
| _getAddParamsFnc ($iCur, $iActShop) | |
| _getDynamicUri ($sStdUrl, $sSeoUrl, $iLang) | |
| _getLanguageParam ($iObjectLang) | |
| _getFullUrl ($sSeoUrl, $iLang) | |
| _getSeoIdent ($sSeoUrl, $iLang) | |
| _getStaticUri ($sStdUrl, $iShopId, $iLang) | |
| _getUniqueSeoUrl ($sSeoUrl, $sConstEnd=null, $sObjectId=null) | |
| _loadFromDb ($sType, $sId, $iLang, $iShopId=null, $sParams=null, $blStrictParamsCheck=true) | |
| _prepareTitle ($sTitle, $blSkipTruncate=false) | |
| _saveToDb ($sType, $sObjectId, $sStdUrl, $sSeoUrl, $iLang, $iShopId=null, $blFixed=0, $sKeywords= '', $sDescription= '', $sParams=null) | |
| _trimUrl ($sUrl, $iLang) | |
| _getPageUri ($oObject, $sType, $sStdUrl, $sSeoUrl, $sParams, $iLang=null, $blFixed=false) | |
Protected Attributes | |
| $_iIdLength = 255 | |
| $_sAddParams = null | |
Static Protected Attributes | |
| static | $_aReservedWords = array( 'admin' ) |
| static | $_sSeparator = null |
| static | $_sPrefix = null |
| static | $_instance = null |
| oxSeoEncoder.__construct | ( | ) |
SEO encoder constructor
| static oxSeoEncoder.getInstance | ( | ) | [static] |
Singleton method
Reimplemented in oxSeoEncoderArticle, oxSeoEncoderCategory, oxSeoEncoderContent, and oxSeoEncoderVendor.
| oxSeoEncoder._copyToHistory | ( | $ | sId, | |
| $ | iShopId, | |||
| $ | iLang, | |||
| $ | sType = null, |
|||
| $ | sNewId = null | |||
| ) | [protected] |
Moves current seo record to seo history table
| string | $sId object id | |
| int | $iShopId active shop id | |
| int | $iLang object language | |
| string | $sType object type (if you pass real object - type is not necessary) | |
| string | $sNewId new object id, mostly used for static url updates (optional) |
| oxSeoEncoder._getAddParams | ( | ) | [protected] |
Returns string for SEO url with specific parameters (language, currency and active shop)
| oxSeoEncoder._getAddParamsFnc | ( | $ | iCur, | |
| $ | iActShop | |||
| ) | [protected] |
Returns string for SEO url with specific parameters (language, currency and active shop)
| integer | $iCur shop currency | |
| mixed | $iActShop active shop id |
| oxSeoEncoder._getDynamicUri | ( | $ | sStdUrl, | |
| $ | sSeoUrl, | |||
| $ | iLang | |||
| ) | [protected] |
Returns dynamic object SEO URI
| string | $sStdUrl standart url | |
| string | $sSeoUrl seo uri | |
| int | $iLang active language |
| oxSeoEncoder._getLanguageParam | ( | $ | iObjectLang | ) | [protected] |
Returns part of url defining active language
| int | $iObjectLang object language id |
| oxSeoEncoder._getFullUrl | ( | $ | sSeoUrl, | |
| $ | iLang | |||
| ) | [protected] |
Returns SEO url with shop's path + additional params ( oxseoencoder:: _getAddParams)
| string | $sSeoUrl seo URL | |
| int | $iLang active language |
| oxSeoEncoder._getSeoIdent | ( | $ | sSeoUrl, | |
| $ | iLang | |||
| ) | [protected] |
_getSeoIdent returns seo ident for db search
| string | $sSeoUrl seo url | |
| int | $iLang active language |
| oxSeoEncoder._getStaticUri | ( | $ | sStdUrl, | |
| $ | iShopId, | |||
| $ | iLang | |||
| ) | [protected] |
Returns SEO static uri
| string | $sStdUrl standard page url | |
| int | $iShopId active shop id | |
| int | $iLang active language |
| oxSeoEncoder._getUniqueSeoUrl | ( | $ | sSeoUrl, | |
| $ | sConstEnd = null, |
|||
| $ | sObjectId = null | |||
| ) | [protected] |
_getUniqueSeoUrl returns possibly modified url for not to be same as already existing in db
| string | $sSeoUrl seo url | |
| string | $sConstEnd target "extension" - ".html" or "/" | |
| string | $sObjectId current object id, used to skip self in query |
| oxSeoEncoder._loadFromDb | ( | $ | sType, | |
| $ | sId, | |||
| $ | iLang, | |||
| $ | iShopId = null, |
|||
| $ | sParams = null, |
|||
| $ | blStrictParamsCheck = true | |||
| ) | [protected] |
_loadFromDb loads data from oxseo table if exists returns oxseo url
| string | $sType object type | |
| string | $sId object identifier | |
| int | $iLang active language id | |
| mixed | $iShopId active shop id | |
| string | $sParams additional seo params. optional (mostly used for db indexing) |
| oxSeoEncoder._prepareTitle | ( | $ | sTitle, | |
| $ | blSkipTruncate = false | |||
| ) | [protected] |
Prepares and returns formatted object SEO id
| string | $sTitle Original object title | |
| bool | $blSkipTruncate Truncate title into defined lenght or not |
| oxSeoEncoder._saveToDb | ( | $ | sType, | |
| $ | sObjectId, | |||
| $ | sStdUrl, | |||
| $ | sSeoUrl, | |||
| $ | iLang, | |||
| $ | iShopId = null, |
|||
| $ | blFixed = 0, |
|||
| $ | sKeywords = '', |
|||
| $ | sDescription = '', |
|||
| $ | sParams = null | |||
| ) | [protected] |
_saveToDb saves values to seo table
| string | $sType url type (static, dynamic, oxarticle etc) | |
| string | $sObjectId object identifier | |
| string | $sStdUrl standard url | |
| string | $sSeoUrl seo url | |
| int | $iLang active object language | |
| mixed | $iShopId active object shop id | |
| bool | $blFixed seo entry marker. if true, entry should not be automatically changed | |
| string | $sKeywords object keywords | |
| string | $sDescription object description | |
| string | $sParams additional seo params. optional (mostly used for db indexing) |
| oxSeoEncoder._trimUrl | ( | $ | sUrl, | |
| $ | iLang | |||
| ) | [protected] |
Removes shop path part and session id from given url
| string | $sUrl url to clean bad chars | |
| int | $iLang active language |
| oxSeoEncoder.encodeString | ( | $ | sString | ) |
Replaces special chars in text
| string | $sString string to encode |
| oxSeoEncoder.setSeparator | ( | $ | sSeparator = null |
) |
Sets SEO separator
| string | $sSeparator SEO seperator |
| oxSeoEncoder.setPrefix | ( | $ | sPrefix | ) |
Sets SEO prefix
| string | $sPrefix SEO prefix |
| oxSeoEncoder.setIdLength | ( | $ | iIdlength = null |
) |
sets seo id length
| string | $iIdlength id length |
| oxSeoEncoder.setReservedWords | ( | $ | aReservedWords | ) |
Sets array of words which must be checked before building seo url
| array | $aReservedWords reserved words |
| oxSeoEncoder.markAsExpired | ( | $ | sId, | |
| $ | iShopId = null, |
|||
| $ | iLang = null, |
|||
| $ | sParams = null | |||
| ) |
Marks object seo records as expired
| string | $sId changed object id. If null is passed, object dependency is not checked | |
| int | $iShopId active shop id. Shop id must be passed uf you want to do shop level update (default null) | |
| int | $iLang active language (optiona;) |
| oxSeoEncoder._getPageUri | ( | $ | oObject, | |
| $ | sType, | |||
| $ | sStdUrl, | |||
| $ | sSeoUrl, | |||
| $ | sParams, | |||
| $ | iLang = null, |
|||
| $ | blFixed = false | |||
| ) | [protected] |
Loads if exists or prepares and saves new seo url for passed object
| oxbase | $oObject object to prepare seo data | |
| string | $sType type of object (oxvendor/oxcategory) | |
| string | $sStdUrl stanradr url | |
| string | $sSeoUrl seo uri | |
| string | $sParams additional params, liek page number etc. mostly used by mysql for indexes | |
| bool | $blFixed fixed url marker (default is false) |
| oxSeoEncoder.encodeStaticUrls | ( | $ | aStaticUrl, | |
| $ | iShopId, | |||
| $ | iLang | |||
| ) |
Static url encoder
| array | $aStaticUrl aratic url info (contains standard URL and urls for each language) | |
| int | $iShopId active shop id | |
| int | $iLang active language |
| oxSeoEncoder.copyStaticUrls | ( | $ | iShopId | ) |
Method copies static urls from base shop to newly created
| int | $iShopId new created shop id |
| oxSeoEncoder.getStaticUrl | ( | $ | sStdUrl, | |
| $ | iLang = null, |
|||
| $ | iShopId = null | |||
| ) |
Returns static url for passed standard link (if available)
| string | $sStdUrl standard Url | |
| int | $iLang active language (optional). default null | |
| int | $iShopId active shop id (optional). default null |
| oxSeoEncoder.addSeoEntry | ( | $ | sObjectId, | |
| $ | iShopId, | |||
| $ | iLang, | |||
| $ | sStdUrl, | |||
| $ | sSeoUrl, | |||
| $ | sType, | |||
| $ | blFixed = 1, |
|||
| $ | sKeywords = '', |
|||
| $ | sDescription = '', |
|||
| $ | sParams = '' | |||
| ) |
Adds new seo entry to db
| string | $sObjectId objects id | |
| int | $iShopId shop id | |
| int | $iLang objects language | |
| string | $sStdUrl default url | |
| string | $sSeoUrl seo url | |
| string | $sType object type | |
| bool | $blFixed marker to keep seo config unchangeable | |
| string | $sKeywords seo keywords | |
| string | $sDescription seo description | |
| string | $sParams additional seo params. optional (mostly used for db indexing) |
| oxSeoEncoder.deleteSeoEntry | ( | $ | sObjectId, | |
| $ | iShopId, | |||
| $ | iLang, | |||
| $ | sType | |||
| ) |
Removes seo entry from db
| string | $sObjectId objects id | |
| int | $iShopId shop id | |
| int | $iLang objects language | |
| string | $sType object type |
| oxSeoEncoder.getMetaData | ( | $ | sObjectId, | |
| $ | sMetaType, | |||
| $ | iShopId = null, |
|||
| $ | iLang = null | |||
| ) |
Returns meta information for preferred object
| string | $sObjectId information object id | |
| string | $sMetaType metadata type - "oxkeywords", "oxdescription" | |
| int | $iShopId active shop id | |
| int | $iLang active language |
| oxSeoEncoder.getDynamicUrl | ( | $ | sStdUrl, | |
| $ | sSeoUrl, | |||
| $ | iLang | |||
| ) |
getDynamicUrl acts similar to static urls, except, that dynamic url are not shown in admin and they can be reencoded by providing new seo url
| string | $sStdUrl standard url | |
| string | $sSeoUrl part of URL query which will be attached to standard shop url | |
| int | $iLang active language |
oxSeoEncoder.$_aReservedWords = array( 'admin' ) [static, protected] |
oxSeoEncoder.$_sSeparator = null [static, protected] |
oxSeoEncoder.$_iIdLength = 255 [protected] |
oxSeoEncoder.$_sPrefix = null [static, protected] |
oxSeoEncoder.$_sAddParams = null [protected] |
oxSeoEncoder.$_instance = null [static, protected] |
Singleton instance.
Reimplemented in oxSeoEncoderArticle, oxSeoEncoderCategory, oxSeoEncoderContent, and oxSeoEncoderVendor.
1.5.5