OXID eShop CE
7.0.0
|
Public Member Functions | |
getConfigParam ($name, $default=null) | |
setConfigParam ($name, $value) | |
initVars ($shopId) | |
init () | |
reinitialize () | |
pageClose () | |
getRequestControllerId () | |
getRequestControllerClass () | |
getUploadedFile ($paramName) | |
setGlobalParameter ($name, $value) | |
getGlobalParameter ($name) | |
checkParamSpecialChars (&$value, $raw=null) | |
setShopId ($shopId) | |
getShopId () | |
setIsSsl ($isSsl=false) | |
isSsl () | |
isHttpsOnly () | |
isCurrentUrl ($url) | |
isCurrentProtocol ($url) | |
getShopUrl ($lang=null, $admin=null) | |
getSslShopUrl ($lang=null) | |
getCoreUtilsUrl () | |
getCurrentShopUrl ($admin=null) | |
getShopCurrentUrl ($lang=null) | |
getShopHomeUrl ($lang=null, $admin=null) | |
getWidgetUrl ($languageId=null, $inAdmin=null, $urlParameters=[]) | |
getShopSecureHomeUrl () | |
getShopCurrency () | |
getActShopCurrencyObject () | |
setActShopCurrency ($cur) | |
getOutDir ($absolute=true) | |
getViewsDir ($absolute=true) | |
getTranslationsDir ($file, $dir, $absolute=true) | |
getAppDir ($absolute=true) | |
getOutUrl ($ssl=null, $admin=null, $nativeImg=false) | |
getDir ($file, $dir, $admin, $lang=null, $shop=null, $theme=null, $absolute=true, $ignoreCust=false) | |
getUrl ($file, $dir, $admin=null, $ssl=null, $nativeImg=false, $lang=null, $shop=null, $theme=null) | |
getImagePath ($file, $admin=false) | |
getImageUrl ($admin=false, $ssl=null, $nativeImg=null, $file=null) | |
getImageDir ($admin=false) | |
getPicturePath ($file, $admin=false, $lang=null, $shop=null, $theme=null) | |
getMasterPictureDir ($admin=false) | |
getMasterPicturePath ($file, $admin=false) | |
getPictureUrl ($file, $admin=false, $ssl=null, $lang=null, $shopId=null, $defPic="master/nopic.jpg") | |
getPictureDir ($admin) | |
getTemplatePath ($templateName, $isAdmin) | |
getTemplateDir ($admin=false) | |
getTemplateUrl ($file=null, $admin=false, $ssl=null, $lang=null) | |
getTemplateBase ($admin=false) | |
getResourcePath ($file='', $admin=false) | |
getResourceUrl ($file='', $admin=false, $ssl=null, $lang=null) | |
getResourceDir ($admin) | |
getCurrencyArray ($currency=null) | |
getCurrencyObject ($name) | |
isDemoShop () | |
getFullEdition () | |
getPackageInfo () | |
getMandateCount () | |
isMall () | |
detectVersion () | |
saveShopConfVar ($varType, $varName, $varVal, $shopId=null, $module='') | |
getShopConfVar ($varName, $shopId=null, $module='') | |
decodeValue ($type, $mOrigValue) | |
isProductiveMode () | |
getBaseShopId () | |
getActiveShop () | |
getActiveView () | |
getTopActiveView () | |
getActiveViewsList () | |
setActiveView ($view) | |
dropLastActiveView () | |
hasActiveViewsChain () | |
getActiveViewsIds () | |
getLogsDir () | |
isThemeOption ($name) | |
getShopMainUrl () | |
getShopIds () | |
getShopUrlByLanguage ($lang, $ssl=false) | |
getMallShopUrl ($ssl=false) | |
saveSystemConfigParameter ($parameterType, $parameterName, $parameterValue) | |
getSystemConfigParameter ($parameterName) | |
Public Attributes | |
const | OXMODULE_THEME_PREFIX = 'theme:' |
Protected Member Functions | |
processSeoCall () | |
loadAdditionalConfiguration () | |
initializeShop () | |
loadVarsFromFile () | |
setDefaults () | |
loadCustomConfig () | |
loadVarsFromDb ($shopId, $onlyVars=null, $module='') | |
getConfigParamsSelectSnippet ($vars) | |
setConfVarFromDb ($varName, $varType, $varVal) | |
checkSsl () | |
getShopLevelDir ($base, $absBase, $file, $dir, $admin, $lang, $shop, $theme, $absolute, $ignoreCust) | |
handleDbConnectionException (\OxidEsales\Eshop\Core\Exception\DatabaseException $exception) | |
handleCookieException ($ex) | |
isValidShopId ($shopId) | |
calculateActiveShopId () | |
getEditionTemplate ($templateName) | |
getExceptionHandler () | |
informServicesAfterConfigurationChanged ($varName, $shopId, $extension='') | |
Protected Attributes | |
$dbHost = null | |
$dbName = null | |
$dbUser = null | |
$dbPwd = null | |
$dbType = null | |
$sShopURL = null | |
$sSSLShopURL = null | |
$sAdminSSLURL = null | |
$sShopDir = null | |
$sCompileDir = null | |
$iDebug = null | |
$sAdminEmail = null | |
$blSessionUseCookies = null | |
$blNativeImages = true | |
$aMultiShopTables | |
$_oActShop = null | |
$_aActiveViews = [] | |
$_aGlobalParams = [] | |
$_aConfigParams = [] | |
$_aThemeConfigParams = [] | |
$_iLanguageId = null | |
$_iShopId = null | |
$_sOutDir = 'out' | |
$_sImageDir = 'img' | |
$_sPictureDir = 'pictures' | |
$_sMasterPictureDir = 'master' | |
$_sTemplateDir = 'tpl' | |
$_sResourceDir = 'src' | |
$_sModulesDir = 'modules' | |
$_blIsSsl = null | |
$_aAbsDynImageDir = [] | |
$_oActCurrencyObject = null | |
$_blInit = false | |
Private Attributes | |
$_oStart = null | |
Main shop configuration class.
|
protected |
Returns active shop id.
OxidEsales\EshopCommunity\Core\Config::checkParamSpecialChars | ( | & | $value, |
$raw = null |
|||
) |
Checks if passed parameter has special chars and replaces them. Returns checked value.
mixed | $value | value to process escaping |
array | $raw | keys of unescaped values |
|
protected |
Checks if WEB session is SSL.
OxidEsales\EshopCommunity\Core\Config::decodeValue | ( | $type, | |
$mOrigValue | |||
) |
Decodes and returns database value
string | $type | parameter type |
mixed | $mOrigValue | parameter db value |
OxidEsales\EshopCommunity\Core\Config::detectVersion | ( | ) |
Checks version of shop, returns: 0 - version is bellow 2.2 1 - Demo or unlicensed 2 - Pro 3 - Enterprise
OxidEsales\EshopCommunity\Core\Config::dropLastActiveView | ( | ) |
Drop last active view object
OxidEsales\EshopCommunity\Core\Config::getActiveShop | ( | ) |
Loads and returns active shop object
OxidEsales\EshopCommunity\Core\Config::getActiveView | ( | ) |
Returns active view object. If this object was not defined - returns oxubase object
OxidEsales\EshopCommunity\Core\Config::getActiveViewsIds | ( | ) |
Get active views class id list
OxidEsales\EshopCommunity\Core\Config::getActiveViewsList | ( | ) |
Returns all active views objects list.
OxidEsales\EshopCommunity\Core\Config::getActShopCurrencyObject | ( | ) |
Returns active shop currency object.
OxidEsales\EshopCommunity\Core\Config::getAppDir | ( | $absolute = true | ) |
Returns path to out dir
bool | $absolute | mode - absolute/relative path |
OxidEsales\EshopCommunity\Core\Config::getBaseShopId | ( | ) |
Function returns default shop ID
OxidEsales\EshopCommunity\Core\Config::getConfigParam | ( | $name, | |
$default = null |
|||
) |
Returns config parameter value if such parameter exists
string | $name | config parameter name |
mixed | $default | default value if no config var is found default null |
|
protected |
Allow loading from some vars only from baseshop
array | $vars |
OxidEsales\EshopCommunity\Core\Config::getCoreUtilsUrl | ( | ) |
Returns utils dir URL
OxidEsales\EshopCommunity\Core\Config::getCurrencyArray | ( | $currency = null | ) |
Returns array of available currencies
integer | $currency | Active currency number (default null) |
OxidEsales\EshopCommunity\Core\Config::getCurrencyObject | ( | $name | ) |
Returns currency object.
string | $name | Name of active currency |
OxidEsales\EshopCommunity\Core\Config::getCurrentShopUrl | ( | $admin = null | ) |
Returns SSL or non SSL shop URL without index.php depending on Mall affecting environment is admin mode and current ssl usage status
bool | $admin | if admin |
OxidEsales\EshopCommunity\Core\Config::getDir | ( | $file, | |
$dir, | |||
$admin, | |||
$lang = null , |
|||
$shop = null , |
|||
$theme = null , |
|||
$absolute = true , |
|||
$ignoreCust = false |
|||
) |
|
protected |
Check and get template path by Edition if exists
string | $templateName |
|
protected |
OxidEsales\EshopCommunity\Core\Config::getFullEdition | ( | ) |
Returns full eShop edition name
OxidEsales\EshopCommunity\Core\Config::getGlobalParameter | ( | $name | ) |
Returns global parameter value
string | $name | name of cached parameter |
OxidEsales\EshopCommunity\Core\Config::getImageDir | ( | $admin = false | ) |
Finds and returns image folders path
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getImagePath | ( | $file, | |
$admin = false |
|||
) |
Finds and returns image files or folders path
string | $file | File name |
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getImageUrl | ( | $admin = false , |
|
$ssl = null , |
|||
$nativeImg = null , |
|||
$file = null |
|||
) |
Finds and returns image folder url
bool | $admin | Whether to force admin |
bool | $ssl | Whether to force ssl |
bool | $nativeImg | Whether to force native image dirs |
string | $file | Image file name |
OxidEsales\EshopCommunity\Core\Config::getLogsDir | ( | ) |
Returns log files storage path
OxidEsales\EshopCommunity\Core\Config::getMallShopUrl | ( | $ssl = false | ) |
Function returns mall shop url.
bool | $ssl |
OxidEsales\EshopCommunity\Core\Config::getMandateCount | ( | ) |
Counts OXID mandates
OxidEsales\EshopCommunity\Core\Config::getMasterPictureDir | ( | $admin = false | ) |
Finds and returns master pictures folder path
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getMasterPicturePath | ( | $file, | |
$admin = false |
|||
) |
Finds and returns master picture path
string | $file | File name |
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getOutDir | ( | $absolute = true | ) |
Returns path to out dir
bool | $absolute | mode - absolute/relative path |
OxidEsales\EshopCommunity\Core\Config::getOutUrl | ( | $ssl = null , |
|
$admin = null , |
|||
$nativeImg = false |
|||
) |
Returns url to out dir
bool | $ssl | Whether to force ssl |
bool | $admin | Whether to force admin |
bool | $nativeImg | Whether to force native image dirs |
OxidEsales\EshopCommunity\Core\Config::getPackageInfo | ( | ) |
Returns build package info file content.
OxidEsales\EshopCommunity\Core\Config::getPictureDir | ( | $admin | ) |
Finds and returns product pictures folders path
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getPicturePath | ( | $file, | |
$admin = false , |
|||
$lang = null , |
|||
$shop = null , |
|||
$theme = null |
|||
) |
Finds and returns product pictures files or folders path
string | $file | File name |
bool | $admin | Whether to force admin |
int | $lang | Language |
int | $shop | Shop id |
string | $theme | theme name |
OxidEsales\EshopCommunity\Core\Config::getPictureUrl | ( | $file, | |
$admin = false , |
|||
$ssl = null , |
|||
$lang = null , |
|||
$shopId = null , |
|||
$defPic = "master/nopic.jpg" |
|||
) |
Finds and returns product picture file or folder url
string | $file | File name |
bool | $admin | Whether to force admin |
bool | $ssl | Whether to force ssl |
int | $lang | Language |
int | $shopId | Shop id |
string | $defPic | Default (nopic) image path ["0/nopic.jpg"] |
OxidEsales\EshopCommunity\Core\Config::getRequestControllerClass | ( | ) |
Use this function to get the controller class hidden behind the request's 'cl' parameter.
OxidEsales\EshopCommunity\Core\Config::getRequestControllerId | ( | ) |
Get request 'cl' parameter which is the controller id.
OxidEsales\EshopCommunity\Core\Config::getResourceDir | ( | $admin | ) |
Finds and returns resource (css, js, etc..) folders path
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getResourcePath | ( | $file = '' , |
|
$admin = false |
|||
) |
Finds and returns resource (css, js, etc..) files or folders path
string | $file | File name |
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getResourceUrl | ( | $file = '' , |
|
$admin = false , |
|||
$ssl = null , |
|||
$lang = null |
|||
) |
Finds and returns resource (css, js, etc..) file or folder url
string | $file | File name |
bool | $admin | Whether to force admin |
bool | $ssl | Whether to force ssl |
int | $lang | Language id |
OxidEsales\EshopCommunity\Core\Config::getShopConfVar | ( | $varName, | |
$shopId = null , |
|||
$module = '' |
|||
) |
Retrieves shop configuration parameters from DB.
string | $varName | Variable name |
int | $shopId | Shop ID |
string | $module | module identifier |
OxidEsales\EshopCommunity\Core\Config::getShopCurrency | ( | ) |
Returns active shop currency.
OxidEsales\EshopCommunity\Core\Config::getShopCurrentUrl | ( | $lang = null | ) |
Returns SSL or not SSL shop URL with index.php and sid
int | $lang | language (optional) |
OxidEsales\EshopCommunity\Core\Config::getShopHomeUrl | ( | $lang = null , |
|
$admin = null |
|||
) |
Returns shop non SSL URL including index.php and sid.
int | $lang | language |
bool | $admin | if admin |
OxidEsales\EshopCommunity\Core\Config::getShopId | ( | ) |
Returns active shop ID.
OxidEsales\EshopCommunity\Core\Config::getShopIds | ( | ) |
Return active shop ids
|
protected |
string | $base | |
string | $absBase | |
string | $file | |
string | $dir | |
bool | $admin | |
int | $lang | |
int | $shop | |
string | $theme | |
bool | $absolute | |
bool | $ignoreCust |
OxidEsales\EshopCommunity\Core\Config::getShopMainUrl | ( | ) |
Returns SSL or non SSL shop main URL without index.php
OxidEsales\EshopCommunity\Core\Config::getShopSecureHomeUrl | ( | ) |
Returns shop SSL URL with index.php and sid.
OxidEsales\EshopCommunity\Core\Config::getShopUrl | ( | $lang = null , |
|
$admin = null |
|||
) |
Returns config sShopURL or sMallShopURL if secondary shop
int | $lang | language |
bool | $admin | if set true, function returns shop url without checking language/subshops for different url. |
OxidEsales\EshopCommunity\Core\Config::getShopUrlByLanguage | ( | $lang, | |
$ssl = false |
|||
) |
Function returns shop url by given language. #680 per language another URL
integer | $lang | Language id. |
bool | $ssl | Whether to use ssl. |
OxidEsales\EshopCommunity\Core\Config::getSslShopUrl | ( | $lang = null | ) |
Returns config sSSLShopURL or sMallSSLShopURL if secondary shop
int | $lang | language (default is null) |
OxidEsales\EshopCommunity\Core\Config::getSystemConfigParameter | ( | $parameterName | ) |
Retrieves system configuration parameters, which is the same for sub-shops.
string | $parameterName | Variable name |
OxidEsales\EshopCommunity\Core\Config::getTemplateBase | ( | $admin = false | ) |
Finds and returns base template folder url
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getTemplateDir | ( | $admin = false | ) |
Finds and returns templates folders path
bool | $admin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getTemplatePath | ( | $templateName, | |
$isAdmin | |||
) |
Calculates and returns full path to template.
string | $templateName | Template name |
bool | $isAdmin | Whether to force admin |
OxidEsales\EshopCommunity\Core\Config::getTemplateUrl | ( | $file = null , |
|
$admin = false , |
|||
$ssl = null , |
|||
$lang = null |
|||
) |
Finds and returns template file or folder url
string | $file | File name |
bool | $admin | Whether to force admin |
bool | $ssl | Whether to force ssl |
int | $lang | Language id |
OxidEsales\EshopCommunity\Core\Config::getTopActiveView | ( | ) |
Returns top active view object from views chain.
OxidEsales\EshopCommunity\Core\Config::getTranslationsDir | ( | $file, | |
$dir, | |||
$absolute = true |
|||
) |
Returns path to translations dir
string | $file | File name |
string | $dir | Directory name |
bool | $absolute | mode - absolute/relative path |
OxidEsales\EshopCommunity\Core\Config::getUploadedFile | ( | $paramName | ) |
Returns uploaded file parameter
string | $paramName | param name |
OxidEsales\EshopCommunity\Core\Config::getUrl | ( | $file, | |
$dir, | |||
$admin = null , |
|||
$ssl = null , |
|||
$nativeImg = false , |
|||
$lang = null , |
|||
$shop = null , |
|||
$theme = null |
|||
) |
OxidEsales\EshopCommunity\Core\Config::getViewsDir | ( | $absolute = true | ) |
Returns path to out dir
bool | $absolute | mode - absolute/relative path |
OxidEsales\EshopCommunity\Core\Config::getWidgetUrl | ( | $languageId = null , |
|
$inAdmin = null , |
|||
$urlParameters = [] |
|||
) |
Returns widget start non SSL URL including widget.php and sid.
int | $languageId | language |
bool | $inAdmin | if admin |
array | $urlParameters | parameters which should be added to URL. |
|
protected |
Redirect to start page and display the error
\OxidEsales\Eshop\Core\Exception\StandardException | $ex | message to show on exit |
|
protected |
Handle database exception. At this point everything has crashed already and not much of shop business logic is left to call. So just go straight and call the ExceptionHandler.
\OxidEsales\Eshop\Core\Exception\DatabaseException | $exception |
OxidEsales\EshopCommunity\Core\Config::hasActiveViewsChain | ( | ) |
Check if there is more than one active view
|
protected |
Inform respective services if shop/module/theme related configuration data was changed in database.
string | $varName | Variable name |
integer | $shopId | Shop id |
string | $extension | Module or theme name in case of extension config change |
OxidEsales\EshopCommunity\Core\Config::init | ( | ) |
Starts session manager
|
protected |
Initializes main shop tasks - processing of SEO calls, starting of session.
OxidEsales\EshopCommunity\Core\Config::initVars | ( | $shopId | ) |
Initialize configuration variables
OxidEsales\EshopCommunity\Core\Config::isCurrentProtocol | ( | $url | ) |
Compares current protocol to supplied url string
string | $url | URL |
OxidEsales\EshopCommunity\Core\Config::isCurrentUrl | ( | $url | ) |
Compares current URL to supplied string
string | $url | URL |
OxidEsales\EshopCommunity\Core\Config::isDemoShop | ( | ) |
Checks if the shop is in demo mode.
OxidEsales\EshopCommunity\Core\Config::isHttpsOnly | ( | ) |
Checks if shop runs in https only mode https only mode means there is no http url but only a https url
OxidEsales\EshopCommunity\Core\Config::isMall | ( | ) |
Checks if shop is MALL. Returns true on success.
OxidEsales\EshopCommunity\Core\Config::isProductiveMode | ( | ) |
Returns true if current active shop is in productive mode or false if not
OxidEsales\EshopCommunity\Core\Config::isSsl | ( | ) |
Checks if WEB session is SSL. Returns true if yes.
OxidEsales\EshopCommunity\Core\Config::isThemeOption | ( | $name | ) |
Returns true if option is theme option
string | $name | option name |
|
protected |
Returns whether given shop id is valid.
int | $shopId |
|
protected |
Load any additional configuration on Config::init.
|
protected |
Loads vars from custom config file
|
protected |
Load config values from DB
int | $shopId | shop ID to load parameters |
array | $onlyVars | array of params to load (optional) |
string | $module | module vars to load, empty for base options |
|
protected |
Loads vars from default config file
OxidEsales\EshopCommunity\Core\Config::pageClose | ( | ) |
Unsets all session data.
|
protected |
Parse SEO url parameters.
OxidEsales\EshopCommunity\Core\Config::reinitialize | ( | ) |
Reloads all configuration.
OxidEsales\EshopCommunity\Core\Config::saveShopConfVar | ( | $varType, | |
$varName, | |||
$varVal, | |||
$shopId = null , |
|||
$module = '' |
|||
) |
Updates or adds new shop configuration parameters to DB. Arrays must be passed not serialized, serialized values are supported just for backward compatibility.
string | $varType | Variable Type |
string | $varName | Variable name |
mixed | $varVal | Variable value (can be string, integer or array) |
int | $shopId | Shop ID, default is current shop |
string | $module | Module name (empty for base options) |
OxidEsales\EshopCommunity\Core\Config::saveSystemConfigParameter | ( | $parameterType, | |
$parameterName, | |||
$parameterValue | |||
) |
Save system configuration parameters, which is the same for sub-shops.
string | $parameterType | Type |
string | $parameterName | Name |
mixed | $parameterValue | Value (can be string, integer or array) |
OxidEsales\EshopCommunity\Core\Config::setActiveView | ( | $view | ) |
View object setter
object | $view | view object |
OxidEsales\EshopCommunity\Core\Config::setActShopCurrency | ( | $cur | ) |
Sets the actual currency
int | $cur | 0 = EUR, 1 = GBP, 2 = CHF |
OxidEsales\EshopCommunity\Core\Config::setConfigParam | ( | $name, | |
$value | |||
) |
Stores config parameter value in config
string | $name | config parameter name |
mixed | $value | config parameter value |
|
protected |
Sets config variable to config object, first unserializing it by given type. sShopURL and sSSLShopURL are skipped for admin or when URL values are not set
string | $varName | variable name |
string | $varType | variable type - arr, aarr, bool or str |
string | $varVal | serialized by type value |
|
protected |
Set important defaults.
OxidEsales\EshopCommunity\Core\Config::setGlobalParameter | ( | $name, | |
$value | |||
) |
Sets global parameter value
string | $name | name of parameter |
mixed | $value | value to store |
OxidEsales\EshopCommunity\Core\Config::setIsSsl | ( | $isSsl = false | ) |
Set is shop url
bool | $isSsl | - state bool value |
OxidEsales\EshopCommunity\Core\Config::setShopId | ( | $shopId | ) |
Active Shop id setter
int | $shopId | shop id |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const OxidEsales\EshopCommunity\Core\Config::OXMODULE_THEME_PREFIX = 'theme:' |