OXID eShop CE
4.8.10
|
Public Member Functions | |
getUseSkipSaveFields () | |
setUseSkipSaveFields ($blUseSkipSaveFields) | |
__construct () | |
__set ($sName, $sValue) | |
__get ($sName) | |
__isset ($mVar) | |
__clone () | |
oxClone ($oObject) | |
getUpdateSeo () | |
setUpdateSeo ($blUpdateSeo) | |
init ($sTableName=null, $blForceAllFields=false) | |
assign ($dbRecord) | |
getClassName () | |
getCoreTableName () | |
getId () | |
setId ($sOXID=null) | |
setShopId ($iShopId) | |
getShopId () | |
getViewName ($blForceCoreTableUsage=null) | |
modifyCacheKey ($sCacheKey, $blOverride=false) | |
disableLazyLoading () | |
isDerived () | |
setIsDerived ($blVal) | |
isMultilang () | |
load ($sOXID) | |
isLoaded () | |
buildSelectString ($aWhere=null) | |
assignRecord ($sSelect) | |
getFieldData ($sFieldName) | |
getSelectFields ($blForceCoreTableUsage=null) | |
delete ($sOXID=null) | |
save () | |
allowDerivedUpdate () | |
allowDerivedDelete () | |
exists ($sOXID=null) | |
getSqlActiveSnippet ($blForceCoreTable=null) | |
beforeUpdate ($sOXID=null) | |
onChange ($iAction=null, $sOXID=null) | |
setInList () | |
isOx () | |
isReadOnly () | |
setReadOnly ($blReadOnly) | |
getFieldNames () | |
addFieldName ($sName) | |
getLanguage () | |
Public Member Functions inherited from oxSuperCfg | |
__call ($sMethod, $aArgs) | |
getConfig () | |
setConfig ($oConfig) | |
getSession () | |
setSession ($oSession) | |
getUser () | |
setUser ($oUser) | |
isAdmin () | |
setAdminMode ($blAdmin) |
Protected Member Functions | |
_setUpdateSeoOnFieldChange ($sField) | |
_isInList () | |
_getObjectViewName ($sTable, $sShopID=null) | |
_getTableFields ($sTable, $blReturnSimple=false) | |
_getAllFields ($blReturnSimple=false) | |
_initDataStructure ($blForceFullStructure=false) | |
_getNonCachedFieldNames ($blForceFullStructure=false) | |
_getFieldStatus ($sFieldName) | |
_addField ($sName, $iStatus, $sType=null, $sLength=null) | |
_getFieldLongName ($sFieldName) | |
_setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT) | |
_canFieldBeNull ($sFieldName) | |
_getFieldDefaultValue ($sFieldName) | |
_getUpdateFieldValue ($sFieldName, $oField) | |
_getUpdateFields ($blUseSkipSaveFields=true) | |
_update () | |
_insert () | |
_isDisabledFieldCache () |
Protected Attributes | |
$_sOXID = null | |
$_iShopId = null | |
$_blIsSimplyClonable = true | |
$_sClassName = 'oxbase' | |
$_sCoreTable = null | |
$_sViewTable = null | |
$_aFieldNames = array('oxid' => 0) | |
$_sCacheKey = null | |
$_blUseLazyLoading = false | |
$_aSkipSaveFields = array('oxtimestamp') | |
$_blUseSkipSaveFields = true | |
$_sExistKey = 'oxid' | |
$_blIsDerived = null | |
$_blIsSeoObject = false | |
$_blUpdateSeo = true | |
$_blReadOnly = false | |
$_blIsInList = false | |
$_isLoaded = false | |
$_aInnerLazyCache = null | |
$_blEmployMultilanguage = false |
Static Protected Attributes | |
static | $_blDisableFieldCaching = array() |
Static Protected Attributes inherited from oxSuperCfg | |
static | $_oConfig = null |
static | $_oSession = null |
static | $_oRights = null |
static | $_oActUser = null |
static | $_blIsAdmin = null |
Base class associated with database record
Definition at line 16 of file oxbase.php.
oxBase::__construct | ( | ) |
Class constructor, sets active shop.
Reimplemented from oxSuperCfg.
Reimplemented in oxOrder, oxUser, oxCategory, oxDelivery, oxPayment, oxUserPayment, oxOrderArticle, oxContent, oxPricealarm, oxFile, oxManufacturer, oxVendor, oxSimpleVariant, oxNewsletter, oxUserBasketItem, oxDiscount, oxUserBasket, oxWrapping, oxRecommList, oxAttribute, oxI18n, oxNewsSubscribed, oxTagList, oxNews, oxGbEntry, oxOrderFile, oxVoucher, oxAddress, oxRemark, oxShop, oxCountry, oxRating, oxReview, oxVoucherSerie, oxObject2Group, oxArticleTagList, oxLinks, oxDeliverySet, oxActions, oxGroups, oxMediaUrl, oxState, and oxStatistic.
Definition at line 192 of file oxbase.php.
oxBase::__clone | ( | ) |
Magic function invoked on object cloning. Basically takes care about cloning properly DB fields.
Definition at line 342 of file oxbase.php.
oxBase::__get | ( | $sName | ) |
Magic getter for older versions and template variables
string | $sName | variable name |
Reimplemented in oxVoucher, oxArticle, oxOrder, oxUser, oxCategory, oxManufacturer, oxContent, and oxUserPayment.
Definition at line 243 of file oxbase.php.
oxBase::__isset | ( | $mVar | ) |
Magic isset() handler. Workaround for detecting if protected properties are set.
mixed | $mVar | Supplied class variable |
Definition at line 332 of file oxbase.php.
oxBase::__set | ( | $sName, | |
$sValue | |||
) |
Magic setter. If using lazy loading, adds setted field to fields array
string | $sName | name value |
mixed | $sValue | value |
Reimplemented in oxArticle.
Definition at line 221 of file oxbase.php.
|
protected |
Adds additional field to meta structure
string | $sName | Field name |
int | $iStatus | Field name status. In derived classes it indicates multi language status. |
string | $sType | Field type |
string | $sLength | Field Length |
Reimplemented in oxI18n.
Definition at line 1131 of file oxbase.php.
|
protected |
check if db field can be null
string | $sFieldName | db field name |
Reimplemented in oxI18n.
Definition at line 1234 of file oxbase.php.
|
protected |
Returns meta field or simple array of all object fields. This method is slow and normally is called before field cache is built. Make sure it is not called after first page is loaded and cache data is fully built (until tmp dir is cleaned).
bool | $blReturnSimple | Set $blReturnSimple to true when you need simple array (meta data array is returned otherwise) |
Reimplemented in oxI18n.
Definition at line 1016 of file oxbase.php.
|
protected |
returns default field value
string | $sFieldName | db field name |
Definition at line 1252 of file oxbase.php.
|
protected |
Returns long field name in "<table>__<field_name>" format.
string | $sFieldName | Short field name |
Reimplemented in oxOrderFile.
Definition at line 1174 of file oxbase.php.
|
protected |
Returns _aFieldName[] value. 0 means - non multi language, 1 - multi language field. But this is defined only in derived oxi18n class. In oxBase it is always 0, as oxBase treats all fields as non multi language.
string | $sFieldName | Field name |
Reimplemented in oxI18n.
Definition at line 1116 of file oxbase.php.
|
protected |
Returns the list of fields. This function is slower and its result is normally cached. Basically we have 3 separate cases here:
bool | $blForceFullStructure | Whether to force loading of full data structure |
Reimplemented in oxI18n.
Definition at line 1068 of file oxbase.php.
|
protected |
Returns actual object view or table name
string | $sTable | Original table name |
int | $sShopID | Shop ID |
Reimplemented in oxI18n.
Definition at line 958 of file oxbase.php.
|
protected |
Returns meta field or simple array of all object fields. This method is slow and normally is called before field cache is built. Make sure it is not called after first page is loaded and cache data is fully built (until tmp dir is cleaned).
string | $sTable | table name |
bool | $blReturnSimple | Set $blReturnSimple to true when you need simple array (meta data array is returned otherwise) |
Definition at line 974 of file oxbase.php.
|
protected |
Get object fields sql part used for updates or inserts: return e.g. fldName1 = 'value1',fldName2 = 'value2'...
bool | $blUseSkipSaveFields | forces usage of skip save fields array (default is true) |
Reimplemented in oxI18n.
Definition at line 1301 of file oxbase.php.
|
protected |
returns quoted field value for using in update statement
string | $sFieldName | name of field |
oxField | $oField | field object |
Definition at line 1271 of file oxbase.php.
|
protected |
Initializes object data structure. Either by trying to load from cache or by calling $this->_getNonCachedFieldNames
bool | $blForceFullStructure | Set to true if you want to load full structure in any case. |
Definition at line 1032 of file oxbase.php.
|
protected |
Insert this Object into the database, this function only works on the main table, it will not save any dependent tables, which might be loaded through oxlist.
Reimplemented in oxArticle, oxUser, oxOrder, oxCategory, oxOrderArticle, oxI18n, oxNews, oxUserPayment, oxNewsSubscribed, oxPricealarm, oxReview, oxGbEntry, oxUserBasket, and oxRemark.
Definition at line 1369 of file oxbase.php.
|
protected |
Checks if current class disables field caching. This method is primary used in unit tests.
Definition at line 1406 of file oxbase.php.
|
protected |
Checks if this instance is one of oxList elements.
Definition at line 945 of file oxbase.php.
|
protected |
Sets data field value
string | $sFieldName | index OR name (eg. 'oxarticles__oxtitle') of a data field to set |
string | $sValue | value of data field |
int | $iDataType | field type |
Reimplemented in oxCategory, oxContent, oxNewsletter, oxOrderArticle, oxUserBasketItem, oxNews, oxStatistic, and oxLinks.
Definition at line 1193 of file oxbase.php.
|
protected |
Checks whether certain field has changed, and sets update seo flag if needed. It can only set the value to false, so it allows for multiple calls to the method, and if atleast one requires seo update, other checks won't override that.
string | $sField | Field name that will be checked |
Reimplemented in oxI18n.
Definition at line 400 of file oxbase.php.
|
protected |
Update this Object into the database, this function only works on the main table, it will not save any dependent tables, which might be loaded through oxlist.
oxObjectException | Throws on failure inserting |
Reimplemented in oxArticle, oxUser, oxOrder, oxCategory, oxI18n, oxUserPayment, oxNews, and oxNewsSubscribed.
Definition at line 1329 of file oxbase.php.
oxBase::addFieldName | ( | $sName | ) |
Adds additional field name to meta structure
string | $sName | Field name |
Definition at line 1469 of file oxbase.php.
oxBase::allowDerivedDelete | ( | ) |
Checks if derived delete is allowed (calls oxbase::isDerived)
Definition at line 846 of file oxbase.php.
oxBase::allowDerivedUpdate | ( | ) |
Checks if derived update is allowed (calls oxbase::isDerived)
Reimplemented in oxUser.
Definition at line 836 of file oxbase.php.
oxBase::assign | ( | $dbRecord | ) |
Assigns DB field values to object fields. Returns true on success.
array | $dbRecord | Associative data values array |
Reimplemented in oxArticle, oxOrder, oxCategory, oxContent, oxManufacturer, oxOrderArticle, oxVendor, oxSimpleVariant, oxNews, oxGbEntry, and oxReview.
Definition at line 445 of file oxbase.php.
oxBase::assignRecord | ( | $sSelect | ) |
Performs SQL query, assigns record field values to object. Returns true on success.
string | $sSelect | SQL statement |
Definition at line 698 of file oxbase.php.
oxBase::beforeUpdate | ( | $sOXID = null | ) |
This function is triggered before the record is updated. If you make any update to the database record manually you should also call beforeUpdate() from your script.
string | $sOXID | Object ID(default null). Pass the ID in case object is not loaded. |
Definition at line 911 of file oxbase.php.
oxBase::buildSelectString | ( | $aWhere = null | ) |
Builds and returns SQL query string.
mixed | $aWhere | SQL select WHERE conditions array (default false) |
Definition at line 672 of file oxbase.php.
oxBase::delete | ( | $sOXID = null | ) |
Delete this object from the database, returns true on success.
string | $sOXID | Object ID(default null) |
Reimplemented in oxArticle, oxOrder, oxOrderArticle, oxI18n, oxUser, oxPayment, oxContent, oxManufacturer, oxDelivery, oxUserBasket, oxVendor, oxFile, oxCategory, oxRecommList, oxNews, oxMediaUrl, oxSelectlist, oxActions, oxNewsletter, oxDiscount, oxAttribute, oxVoucherSerie, oxDeliverySet, and oxGroups.
Definition at line 758 of file oxbase.php.
oxBase::disableLazyLoading | ( | ) |
Disables lazy loading mechanism and init object fully
Definition at line 593 of file oxbase.php.
oxBase::exists | ( | $sOXID = null | ) |
Checks if this object exists, returns true on success.
string | $sOXID | Object ID(default null) |
Reimplemented in oxUser.
Definition at line 858 of file oxbase.php.
oxBase::getClassName | ( | ) |
oxBase::getCoreTableName | ( | ) |
oxBase::getFieldData | ( | $sFieldName | ) |
Gets field data
string | $sFieldName | name (eg. 'oxtitle') of a data field to get |
Definition at line 719 of file oxbase.php.
oxBase::getFieldNames | ( | ) |
oxBase::getId | ( | ) |
oxBase::getLanguage | ( | ) |
Returns -1, means object is not multi language
Reimplemented in oxOrderArticle, and oxI18n.
Definition at line 1482 of file oxbase.php.
oxBase::getSelectFields | ( | $blForceCoreTableUsage = null | ) |
Function builds the field list used in select.
bool | $blForceCoreTableUsage | (optional) use core views |
Definition at line 732 of file oxbase.php.
oxBase::getShopId | ( | ) |
oxBase::getSqlActiveSnippet | ( | $blForceCoreTable = null | ) |
Returns SQL select string with checks if items are available
bool | $blForceCoreTable | forces core table usage (optional) |
Reimplemented in oxArticle, and oxCategory.
Definition at line 881 of file oxbase.php.
oxBase::getUpdateSeo | ( | ) |
oxBase::getUseSkipSaveFields | ( | ) |
oxBase::getViewName | ( | $blForceCoreTableUsage = null | ) |
Returns main table data is actually selected from (could be a view name as well)
bool | $blForceCoreTableUsage | (optional) use core views |
Definition at line 548 of file oxbase.php.
oxBase::init | ( | $sTableName = null , |
|
$blForceAllFields = false |
|||
) |
Sets the names to main and view tables, loads metadata of each table.
string | $sTableName | Name of DB object table |
bool | $blForceAllFields | Forces initialisation of all fields overriding lazy loading functionality |
Definition at line 424 of file oxbase.php.
oxBase::isDerived | ( | ) |
Returns true in case the item represented by this object is derived from parent shop
Definition at line 605 of file oxbase.php.
oxBase::isLoaded | ( | ) |
oxBase::isMultilang | ( | ) |
Returns true, if object has multi language fields (if object is derived from oxi18n class). In oxBase it is always returns false, as oxBase treats all fields as non multi language.
Reimplemented in oxI18n.
Definition at line 629 of file oxbase.php.
oxBase::isOx | ( | ) |
Checks if object ID's first two chars are 'o' and 'x'. Returns true or false
Definition at line 1421 of file oxbase.php.
oxBase::isReadOnly | ( | ) |
oxBase::load | ( | $sOXID | ) |
Loads object data from DB (object data ID is passed to method). Returns true on success. could throw oxObjectException F ?
string | $sOXID | Object ID |
Reimplemented in oxArticle, oxUser, oxCategory, oxManufacturer, oxUserPayment, oxVendor, oxArticleTagList, oxReview, oxNewsSubscribed, and oxRemark.
Definition at line 643 of file oxbase.php.
oxBase::modifyCacheKey | ( | $sCacheKey, | |
$blOverride = false |
|||
) |
Lazy loading cache key modifier.
string | $sCacheKey | cache key |
bool | $blOverride | marker to force override cache key |
Reimplemented in oxI18n.
Definition at line 579 of file oxbase.php.
oxBase::onChange | ( | $iAction = null , |
|
$sOXID = null |
|||
) |
This function is triggered whenever the object is saved or deleted. onChange() is triggered after saving the changes in Save() method, after deleting the instance from the database. If you make any change to the database record manually you should also call onChange() from your script.
int | $iAction | Action identifier. |
string | $sOXID | Object ID(default null). Pass the ID in case object is not loaded. |
Definition at line 925 of file oxbase.php.
oxBase::oxClone | ( | $oObject | ) |
Clone this object - similar to Copy Constructor.
object | $oObject | Object to copy |
Definition at line 361 of file oxbase.php.
oxBase::save | ( | ) |
Save this Object to database, insert or update as needed.
Reimplemented in oxArticle, oxOrder, oxOrderArticle, oxRecommList, oxUser, oxContent, oxArticleTagList, and oxObject2Group.
Definition at line 790 of file oxbase.php.
oxBase::setId | ( | $sOXID = null | ) |
Sets unique object id
string | $sOXID | Record ID |
Reimplemented in oxArticle.
Definition at line 505 of file oxbase.php.
oxBase::setInList | ( | ) |
oxBase::setIsDerived | ( | $blVal | ) |
Returns true in case the item represented by this object is derived from parent shop
bool | $blVal | if derived |
Definition at line 618 of file oxbase.php.
oxBase::setReadOnly | ( | $blReadOnly | ) |
Set object readonly
bool | $blReadOnly | readonly flag |
Definition at line 1447 of file oxbase.php.
oxBase::setShopId | ( | $iShopId | ) |
Sets original object shop ID
int | $iShopId | New shop ID |
Reimplemented in oxOrderFile.
Definition at line 526 of file oxbase.php.
oxBase::setUpdateSeo | ( | $blUpdateSeo | ) |
oxBase::setUseSkipSaveFields | ( | $blUseSkipSaveFields | ) |
Setting use skip fields or not
bool | $blUseSkipSaveFields | - true or false |
Definition at line 184 of file oxbase.php.
|
protected |
Definition at line 62 of file oxbase.php.
|
protected |
Definition at line 157 of file oxbase.php.
|
protected |
Definition at line 83 of file oxbase.php.
|
staticprotected |
Definition at line 115 of file oxbase.php.
|
protected |
Definition at line 164 of file oxbase.php.
|
protected |
Definition at line 104 of file oxbase.php.
|
protected |
Definition at line 143 of file oxbase.php.
|
protected |
Definition at line 122 of file oxbase.php.
|
protected |
Definition at line 35 of file oxbase.php.
|
protected |
Definition at line 136 of file oxbase.php.
|
protected |
Definition at line 129 of file oxbase.php.
|
protected |
Definition at line 76 of file oxbase.php.
|
protected |
Definition at line 90 of file oxbase.php.
|
protected |
Definition at line 28 of file oxbase.php.
|
protected |
Definition at line 150 of file oxbase.php.
|
protected |
Definition at line 69 of file oxbase.php.
|
protected |
Definition at line 41 of file oxbase.php.
|
protected |
Definition at line 48 of file oxbase.php.
|
protected |
Definition at line 96 of file oxbase.php.
|
protected |
Definition at line 22 of file oxbase.php.
|
protected |
Definition at line 54 of file oxbase.php.