OXID eShop CE  4.8.11
 All Classes Files Functions Variables Pages
oxShopMetaData Class Reference
+ Inheritance diagram for oxShopMetaData:
+ Collaboration diagram for oxShopMetaData:

Public Member Functions

 getShopBit ($iShopId)
 getShopBits ($iShopId)
 getMultiShopBits ()
 getParentShopBits ($sShopId, $blIsInherited=null)
 isIncludedInShop ($iShopId, $sTable, $sOXID)
 isExcludedFromShop ($iShopId, $sTable, $sOXID)
 getShopFieldSet ($iShopId)
 getShopFields ()
 shopFieldSetExist ($iShopId, $sTable= 'oxarticles')
 addShopFieldSets ($iShopId)
 getShopFieldSetSuffix ($iSet)
 getShopFieldSuffix ($iShopId)
 getShopFieldSetName ($sField, $iSet)
 getShopFieldName ($sField, $iShopId)
 getSqlSetIncludeSnippet ($iShopId)
 getSqlUnsetIncludeSnippet ($iShopId)
 getSqlSetExcludeSnippet ($iShopId)
 getSqlUnsetExcludeSnippet ($iShopId)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Static Public Member Functions

static getInstance ()

Public Attributes

const SHOP_FIELD_SET_SIZE = 64

Protected Member Functions

 _getShopFieldSetId ($iShopId)
 _getShopFieldCount ()
 _getMaxShopId ()
 _combineShopSetBits ($aShopSetBits)

Static Private Attributes

static $_instance = null

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Shop meta data manager.

Definition at line 7 of file oxshopmetadata.php.

Member Function Documentation

oxShopMetaData::_combineShopSetBits (   $aShopSetBits)
protected

Combines shop set bit arrays to one bit using binary OR. We use mySQL to calculate that, as currently php integer size is only 32 bits.

Parameters
array$aShopSetBitsshop id bits
Returns
array

Definition at line 416 of file oxshopmetadata.php.

oxShopMetaData::_getMaxShopId ( )
protected

Returns maaximum existing shop id

Returns
int

Definition at line 403 of file oxshopmetadata.php.

oxShopMetaData::_getShopFieldCount ( )
protected

Returns shop field count

Returns
int

Definition at line 393 of file oxshopmetadata.php.

oxShopMetaData::_getShopFieldSetId (   $iShopId)
protected

Returns shop field offset

Parameters
int$iShopIdShop ID
Returns
int

Definition at line 383 of file oxshopmetadata.php.

oxShopMetaData::addShopFieldSets (   $iShopId)

Returns array of shop bits

Parameters
int$iShopIdcurrent shop id
Returns
bool

Definition at line 223 of file oxshopmetadata.php.

static oxShopMetaData::getInstance ( )
static

resturns a single instance of this class

Deprecated:
since v5.0 (2012-08-10); Use oxRegistry::get("oxShopMetaData") instead
Returns
oxShopMetaData

Definition at line 30 of file oxshopmetadata.php.

oxShopMetaData::getMultiShopBits ( )

Returns array filled with max 64bit integers

Returns
array[int]int

Definition at line 81 of file oxshopmetadata.php.

oxShopMetaData::getParentShopBits (   $sShopId,
  $blIsInherited = null 
)

Returns shop sets bit of inherited shop up to uninherited parent

Parameters
string$sShopIdcurrent shop id
bool$blIsInheritedif this table is inherited
Returns
int

Definition at line 100 of file oxshopmetadata.php.

oxShopMetaData::getShopBit (   $iShopId)

Returns integer number with bit set according to $iShopId. The action performed could be represented as pow(2, $iShopId - 1) We use mySQL to calculate that, as currently php int size is only 32 bit.

Parameters
int$iShopIdcurrent shop id
Returns
int

Definition at line 44 of file oxshopmetadata.php.

oxShopMetaData::getShopBits (   $iShopId)

Returns array of shop bits

Parameters
int$iShopIdcurrent shop id
Returns
array[int]int

Definition at line 63 of file oxshopmetadata.php.

oxShopMetaData::getShopFieldName (   $sField,
  $iShopId 
)

Gets shop field suffix and optionally appends ti to given field name.

Parameters
string$sFieldField name
int$iShopIdShop ID
Returns
string

Definition at line 302 of file oxshopmetadata.php.

oxShopMetaData::getShopFields ( )

Returns all shop field sets (oxshopincl, oxshopexcl, oxshopincl1, oxshopexcl2, ...)

Returns
array

Definition at line 183 of file oxshopmetadata.php.

oxShopMetaData::getShopFieldSet (   $iShopId)

Returns shop field offset

Parameters
int$iShopIdShop ID
Returns
int

Definition at line 173 of file oxshopmetadata.php.

oxShopMetaData::getShopFieldSetName (   $sField,
  $iSet 
)

Gets shop field setsuffix and optionally appends ti to given field name.

Parameters
string$sFieldField name
int$iSetShop field set index
Returns
string

Definition at line 288 of file oxshopmetadata.php.

oxShopMetaData::getShopFieldSetSuffix (   $iSet)

Gets shop field setsuffix and optionally appends ti to given field name.

Parameters
int$iSetShop field set index
Returns
string

Definition at line 261 of file oxshopmetadata.php.

oxShopMetaData::getShopFieldSuffix (   $iShopId)

Returns shop field (empty when calculated shop field set is zero).

Parameters
int$iShopIdShop ID
Returns
string

Definition at line 274 of file oxshopmetadata.php.

oxShopMetaData::getSqlSetExcludeSnippet (   $iShopId)

Returns SQL snippet for setting oxshopexcl fields

Parameters
int$iShopIdshop ID
Returns
string

Definition at line 350 of file oxshopmetadata.php.

oxShopMetaData::getSqlSetIncludeSnippet (   $iShopId)

Returns SQL snippet for setting oxshopincl fields

Parameters
int$iShopIdshop ID
Returns
string

Definition at line 316 of file oxshopmetadata.php.

oxShopMetaData::getSqlUnsetExcludeSnippet (   $iShopId)

Returns SQL snippet for unsetting oxshopexcl fields

Parameters
int$iShopIdshop ID
Returns
string

Definition at line 367 of file oxshopmetadata.php.

oxShopMetaData::getSqlUnsetIncludeSnippet (   $iShopId)

Returns SQL snippet for setting oxshopincl fields

Parameters
int$iShopIdshop ID
Returns
string

Definition at line 333 of file oxshopmetadata.php.

oxShopMetaData::isExcludedFromShop (   $iShopId,
  $sTable,
  $sOXID 
)

Return true if specified table record is excluded from gives shop

Parameters
int$iShopIdshop id
string$sTablemall table name
string$sOXIDrecord id
Returns
bool

Definition at line 156 of file oxshopmetadata.php.

oxShopMetaData::isIncludedInShop (   $iShopId,
  $sTable,
  $sOXID 
)

Return true if specified table record is included in gives shop

Parameters
int$iShopIdshop id
string$sTablemall table name
string$sOXIDrecord id
Returns
bool

Definition at line 137 of file oxshopmetadata.php.

oxShopMetaData::shopFieldSetExist (   $iShopId,
  $sTable = 'oxarticles' 
)

Returns true if shop field sets (oxshopincl, oxshopexcl) exist for given table

Parameters
int$iShopIdcurrent shop id
int$sTabletable name (default 'oxarticles')
Returns
bool

Definition at line 204 of file oxshopmetadata.php.

Member Data Documentation

oxShopMetaData::$_instance = null
staticprivate

Definition at line 14 of file oxshopmetadata.php.

const oxShopMetaData::SHOP_FIELD_SET_SIZE = 64

Definition at line 21 of file oxshopmetadata.php.


The documentation for this class was generated from the following file: