Public Member Functions | Protected Member Functions | Protected Attributes

oxMdVariant Class Reference

Inheritance diagram for oxMdVariant:
Collaboration diagram for oxMdVariant:

List of all members.

Public Member Functions

 setId ($sId)
 getId ()
 setParentId ($sParentId)
 getParentId ()
 setMdSubvariants ($aSubvariants)
 getMdSubvariants ()
 getFirstMdSubvariant ()
 getMdSubvariantByName ($sName)
 getLink ()
 setName ($sName)
 getName ()
 getDPrice ()
 getMinDPrice ()
 getMaxDepth ()
 getFPrice ()
 addNames ($sArtId, $aNames, $dPrice, $sUrl)
 getArticleId ()
 hasArticleId ($sArtId)

Protected Member Functions

 _addMdSubvariant ($oSubvariant)
 _isFixedPrice ()

Protected Attributes

 $_sId
 $_sParentId
 $_sArticleId
 $_sName
 $_sUrl
 $_dPrice = null
 $_sFPrice
 $_aSubvariants = array()

Detailed Description

Defines an element of multidimentional variant name tree structure. Contains article id, variant name, URL, price, price text, and a subset of MD variants.

Definition at line 7 of file oxmdvariant.php.


Member Function Documentation

oxMdVariant._addMdSubvariant ( oSubvariant  )  [protected]

Adds one subvariant to subvariant set

Parameters:
OxMdVariant $oSubvariant Subvariant
Returns:
null

Definition at line 354 of file oxmdvariant.php.

oxMdVariant._isFixedPrice (  )  [protected]

Checks if variant price is fixed or not ("from" price)

Returns:
bool

Definition at line 364 of file oxmdvariant.php.

oxMdVariant.addNames ( sArtId,
aNames,
dPrice,
sUrl 
)

Inits MD variant by name. In case $aNames parameter has more than one element addNames recursively adds names for subvariants.

Parameters:
string $sArtId Article ID
array[int] $aNames Expected array of $sKey=>$sName pairs.
double $dPrice Price as double
string $sUrl Article URL
Returns:
null

Definition at line 293 of file oxmdvariant.php.

oxMdVariant.getArticleId (  ) 

Returns corresponding article id or recusively first variant id from subvariant set

Returns:
string

Definition at line 316 of file oxmdvariant.php.

oxMdVariant.getDPrice (  ) 

Returns price

Returns:
double

Definition at line 210 of file oxmdvariant.php.

oxMdVariant.getFirstMdSubvariant (  ) 

Returns first MD subvariant from subvariant set or null in case variant has no subvariants.

Returns:
OxMdVariant

Definition at line 136 of file oxmdvariant.php.

oxMdVariant.getFPrice (  ) 

Returns MD variant price as a text.

Returns:
string

Definition at line 264 of file oxmdvariant.php.

oxMdVariant.getId (  ) 

Returns MD variant identifier

Returns:
string

Definition at line 82 of file oxmdvariant.php.

oxMdVariant.getLink (  ) 

Returns corresponding article URL or recusively first variant URL from subvariant set

Returns:
string

Definition at line 174 of file oxmdvariant.php.

oxMdVariant.getMaxDepth (  ) 

Gets max subvariant depth. 0 means no deeper subvariants.

Returns:
int

Definition at line 242 of file oxmdvariant.php.

oxMdVariant.getMdSubvariantByName ( sName  ) 

Checks for existing MD subvariant by name. Returns existing one or in case $sName has not been found creates an empty OxMdVariant instance.

Parameters:
string $sName Subvariant name
Returns:
OxMdVariant

Definition at line 152 of file oxmdvariant.php.

oxMdVariant.getMdSubvariants (  ) 

Returns full array of subvariants

Returns:
array[string]OxMdSubvariants

Definition at line 126 of file oxmdvariant.php.

oxMdVariant.getMinDPrice (  ) 

Returns min price recursively selected from full subvariant tree.

Returns:
double

Definition at line 220 of file oxmdvariant.php.

oxMdVariant.getName (  ) 

Returns MD variant name

Returns:
string

Definition at line 200 of file oxmdvariant.php.

oxMdVariant.getParentId (  ) 

Returns parent id

Returns:
string

Definition at line 104 of file oxmdvariant.php.

oxMdVariant.hasArticleId ( sArtId  ) 

Checks whether $sArtId is one of subtree article ids.

Parameters:
string $sArtId Article ID
Returns:
bool

Definition at line 333 of file oxmdvariant.php.

oxMdVariant.setId ( sId  ) 

Sets MD variant identifier

Parameters:
string $sId New id
Returns:
null;

Definition at line 72 of file oxmdvariant.php.

oxMdVariant.setMdSubvariants ( aSubvariants  ) 

Sets MD subvariants

Parameters:
array[string]OxMdVariant $aSubvariants Subvariants
Returns:
null

Definition at line 116 of file oxmdvariant.php.

oxMdVariant.setName ( sName  ) 

Name setter

Parameters:
string $sName New name
Returns:
null;

Definition at line 190 of file oxmdvariant.php.

oxMdVariant.setParentId ( sParentId  ) 

Sets parent id

Parameters:
string $sParentId Parent id
Returns:
null;

Definition at line 94 of file oxmdvariant.php.


Member Data Documentation

oxMdVariant.$_aSubvariants = array() [protected]

Definition at line 63 of file oxmdvariant.php.

oxMdVariant.$_dPrice = null [protected]

Definition at line 49 of file oxmdvariant.php.

oxMdVariant.$_sArticleId [protected]

Definition at line 28 of file oxmdvariant.php.

oxMdVariant.$_sFPrice [protected]

Definition at line 56 of file oxmdvariant.php.

oxMdVariant.$_sId [protected]

Definition at line 14 of file oxmdvariant.php.

oxMdVariant.$_sName [protected]

Definition at line 35 of file oxmdvariant.php.

oxMdVariant.$_sParentId [protected]

Definition at line 21 of file oxmdvariant.php.

oxMdVariant.$_sUrl [protected]

Definition at line 42 of file oxmdvariant.php.


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