Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Private Attributes

oxShopMetaData Class Reference

Inheritance diagram for oxShopMetaData:
Collaboration diagram for oxShopMetaData:

List of all members.

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)

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

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 $aShopSetBits shop 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 $iShopId Shop ID
Returns:
int

Definition at line 383 of file oxshopmetadata.php.

oxShopMetaData.addShopFieldSets ( iShopId  ) 

Returns array of shop bits

Parameters:
int $iShopId current 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 $sShopId current shop id
bool $blIsInherited if 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 $iShopId current shop id
Returns:
int

Definition at line 44 of file oxshopmetadata.php.

oxShopMetaData.getShopBits ( iShopId  ) 

Returns array of shop bits

Parameters:
int $iShopId current 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 $sField Field name
int $iShopId Shop 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 $iShopId Shop 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 $sField Field name
int $iSet Shop 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 $iSet Shop 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 $iShopId Shop ID
Returns:
string

Definition at line 274 of file oxshopmetadata.php.

oxShopMetaData.getSqlSetExcludeSnippet ( iShopId  ) 

Returns SQL snippet for setting oxshopexcl fields

Parameters:
int $iShopId shop ID
Returns:
string

Definition at line 350 of file oxshopmetadata.php.

oxShopMetaData.getSqlSetIncludeSnippet ( iShopId  ) 

Returns SQL snippet for setting oxshopincl fields

Parameters:
int $iShopId shop ID
Returns:
string

Definition at line 316 of file oxshopmetadata.php.

oxShopMetaData.getSqlUnsetExcludeSnippet ( iShopId  ) 

Returns SQL snippet for unsetting oxshopexcl fields

Parameters:
int $iShopId shop ID
Returns:
string

Definition at line 367 of file oxshopmetadata.php.

oxShopMetaData.getSqlUnsetIncludeSnippet ( iShopId  ) 

Returns SQL snippet for setting oxshopincl fields

Parameters:
int $iShopId shop 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 $iShopId shop id
string $sTable mall table name
string $sOXID record 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 $iShopId shop id
string $sTable mall table name
string $sOXID record 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 $iShopId current shop id
int $sTable table name (default 'oxarticles')
Returns:
bool

Definition at line 204 of file oxshopmetadata.php.


Member Data Documentation

oxShopMetaData.$_instance = null [static, private]

Definition at line 14 of file oxshopmetadata.php.

Definition at line 21 of file oxshopmetadata.php.


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