Public Member Functions | Protected Member Functions | Protected Attributes

oxTagCloud Class Reference

Inheritance diagram for oxTagCloud:
Collaboration diagram for oxTagCloud:

List of all members.

Public Member Functions

 __construct ()
 setProductId ($sProductId)
 setLanguageId ($iLangId)
 setExtendedMode ($blExtended)
 getLanguageId ()
 getProductId ()
 isExtended ()
 getCloudArray ($sProductId=null, $blExtended=null, $iLang=null)
 getTagLink ($sTag)
 getTagTitle ($sTag)
 getTagSize ($sTag)
 getTags ($sArtId=null, $blExtended=false, $iLang=null)
 _fixTagLength ($sTag)
 stripMetaChars ($sText)
 prepareTags ($sTags)
 trimTags ($sTags)
 resetTagCache ($iLang=null)
 canBeTagged ($sTagTitle)

Protected Member Functions

 _getMaxHit ()
 _sortTags ($aTags, $iLang=null)
 _getFontSize ($iHit, $iMaxHit)
 _getCacheKey ($blExtended, $iLang=null)

Protected Attributes

 $_sCacheKey = "tagcloud_"
 $_blExtended = false
 $_sProductId = null
 $_iLangId = null
 $_iMaxHit = null
 $_aCloudArray = null
 $_sSeparator = ' '
 $_aMetaChars = array('+','-','>','<','(',')','~','*','"','\'','\\')

Detailed Description

Class dedicateg to tag cloud handling

Definition at line 17 of file oxtagcloud.php.


Constructor & Destructor Documentation

oxTagCloud.__construct (  ) 

Object constructor. Initializes separator.

Reimplemented from oxSuperCfg.

Definition at line 81 of file oxtagcloud.php.


Member Function Documentation

oxTagCloud._fixTagLength ( sTag  ) 

Takes tag string and makes shorter tags longer by adding underscore.

Parameters:
string $sTag given tag
Returns:
string

Definition at line 381 of file oxtagcloud.php.

oxTagCloud._getCacheKey ( blExtended,
iLang = null 
) [protected]

Returns tag cache key name.

Parameters:
bool $blExtended Whether to display full list
int $iLang preferred language [optional]
Returns:
null

Definition at line 496 of file oxtagcloud.php.

oxTagCloud._getFontSize ( iHit,
iMaxHit 
) [protected]

Returns font size value for current occurence depending on max occurence.

Parameters:
int $iHit hit count
int $iMaxHit max hits count
Returns:
int

Definition at line 354 of file oxtagcloud.php.

oxTagCloud._getMaxHit (  )  [protected]

Returns max hit

Returns:
int

Definition at line 232 of file oxtagcloud.php.

oxTagCloud._sortTags ( aTags,
iLang = null 
) [protected]

Sorts passed tag array. Using MySQL for sorting (to keep user defined ordering way).

Parameters:
array $aTags tags to sort
int $iLang preferred language [optional]
Returns:
array

Definition at line 316 of file oxtagcloud.php.

oxTagCloud.canBeTagged ( sTagTitle  ) 

Checks if tags was already tagged for the same product

Parameters:
string $sTagTitle given tag
Returns:
bool

Definition at line 508 of file oxtagcloud.php.

oxTagCloud.getCloudArray ( sProductId = null,
blExtended = null,
iLang = null 
)

Returns extended tag cloud array

Parameters:
string $sProductId product id [optional]
bool $blExtended extended clour array mode [optional]
int $iLang language id [optional]
Returns:
array

Definition at line 166 of file oxtagcloud.php.

oxTagCloud.getLanguageId (  ) 

Returns current tag cloud language id

Returns:
int

Definition at line 129 of file oxtagcloud.php.

oxTagCloud.getProductId (  ) 

Returns current tag cloud product id (if available)

Returns:
string

Definition at line 142 of file oxtagcloud.php.

oxTagCloud.getTagLink ( sTag  ) 

Returns tag url (seo or dynamic depends on shop mode)

Parameters:
string $sTag tag title
Returns:
string

Definition at line 203 of file oxtagcloud.php.

oxTagCloud.getTags ( sArtId = null,
blExtended = false,
iLang = null 
)

Returns tag array

Parameters:
string $sArtId article id
bool $blExtended if can extend tags
int $iLang preferred language [optional]
Returns:
array

Definition at line 266 of file oxtagcloud.php.

oxTagCloud.getTagSize ( sTag  ) 

Returns tag size

Parameters:
string $sTag tag title
Returns:
int

Definition at line 247 of file oxtagcloud.php.

oxTagCloud.getTagTitle ( sTag  ) 

Returns html safe tag title

Parameters:
string $sTag tag title
Returns:
string

Definition at line 222 of file oxtagcloud.php.

oxTagCloud.isExtended (  ) 

Extended mode getter

Returns:
bool

Definition at line 152 of file oxtagcloud.php.

oxTagCloud.prepareTags ( sTags  ) 

Takes tags string, checks each tag length and makes shorter tags longer if needed. This is needed for FULLTEXT index

Parameters:
string $sTags given tag
Returns:
string

Definition at line 422 of file oxtagcloud.php.

oxTagCloud.resetTagCache ( iLang = null  ) 

Resets tag cache

Parameters:
int $iLang preferred language [optional]
Returns:
null

Definition at line 477 of file oxtagcloud.php.

oxTagCloud.setExtendedMode ( blExtended  ) 

Tag cloud mode setter (extended or not)

Parameters:
bool $blExtended if true - extended cloud array will be returned
Returns:
null

Definition at line 119 of file oxtagcloud.php.

oxTagCloud.setLanguageId ( iLangId  ) 

Tag cloud language id setter

Parameters:
int $iLangId language id
Returns:
null

Definition at line 107 of file oxtagcloud.php.

oxTagCloud.setProductId ( sProductId  ) 

Tag cloud product id setter

Parameters:
string $sProductId product id
Returns:
null

Definition at line 95 of file oxtagcloud.php.

oxTagCloud.stripMetaChars ( sText  ) 

Strips any mysql FULLTEXT specific meta characters.

Parameters:
string $sText given text
Returns:
string

Definition at line 401 of file oxtagcloud.php.

oxTagCloud.trimTags ( sTags  ) 

Trims underscores and spaces from tags.

Parameters:
string $sTags given tag
Returns:
string

Definition at line 450 of file oxtagcloud.php.


Member Data Documentation

oxTagCloud.$_aCloudArray = null [protected]

Definition at line 59 of file oxtagcloud.php.

oxTagCloud.$_aMetaChars = array('+','-','>','<','(',')','~','*','"','\'','\\') [protected]

Definition at line 75 of file oxtagcloud.php.

oxTagCloud.$_blExtended = false [protected]

Definition at line 31 of file oxtagcloud.php.

oxTagCloud.$_iLangId = null [protected]

Definition at line 45 of file oxtagcloud.php.

oxTagCloud.$_iMaxHit = null [protected]

Definition at line 52 of file oxtagcloud.php.

oxTagCloud.$_sCacheKey = "tagcloud_" [protected]

Definition at line 24 of file oxtagcloud.php.

oxTagCloud.$_sProductId = null [protected]

Definition at line 38 of file oxtagcloud.php.

oxTagCloud.$_sSeparator = ' ' [protected]

Definition at line 67 of file oxtagcloud.php.


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