4 if (!defined(
'OXTAGCLOUD_MINFONT')) {
5 define(
'OXTAGCLOUD_MINFONT', 100);
6 define(
'OXTAGCLOUD_MAXFONT', 400);
7 define(
'OXTAGCLOUD_MINOCCURENCETOSHOW', 2);
8 define(
'OXTAGCLOUD_STARTPAGECOUNT', 20);
9 define(
'OXTAGCLOUD_EXTENDEDCOUNT', 200);
82 $this->_blExtended = $blExtended;
102 $this->_oTagList = $oTagList;
112 return $this->_oTagList;
123 $this->_aCloudArray[$sCacheIdent] = $aTagCloudArray;
134 if (!isset($this->_aCloudArray[$sCacheIdent])) {
137 $this->_aCloudArray[$sCacheIdent] = $this->
formCloudArray($oTagList);
140 return $this->_aCloudArray[$sCacheIdent];
157 $aCloudArray = $myUtils->fromFileCache($sCacheIdent);
161 if ($aCloudArray === null) {
163 $oTagSet = $oTagList->
get();
165 $oTagSet->sortByHitCount();
169 $aCloudArray = $oTagSet->get();
172 $myUtils->toFileCache($sCacheIdent, $aCloudArray);
189 if (is_null($aCloudArray[$sTag])) {
195 return floor($iCurrSize / OXTAGCLOUD_MINFONT) * OXTAGCLOUD_MINFONT;
206 return OXTAGCLOUD_EXTENDEDCOUNT;
208 return OXTAGCLOUD_STARTPAGECOUNT;
220 $this->setLanguageId($iLang);
233 if (($oTagList = $this->
getTagList()) !== null) {
234 $sCacheId = $oTagList->getCacheId();
237 $myUtils->toFileCache($this->
_formCacheKey($sCacheId), null);
239 $this->_aCloudArray = null;
253 return $this->_sCacheKey .
"_" . $this->
getConfig()->getShopId() .
"_" . $sExtended .
"_" . $sTagListCacheId;
263 if ($this->_iMaxHit === null) {
264 $aHits = array_map(array($this,
'_getTagHitCount'), $this->
getCloudArray());
265 $this->_iMaxHit = max($aHits);
280 return $oTag->getHitCount();
294 if ($iMaxHit <= OXTAGCLOUD_MINOCCURENCETOSHOW || !$iMaxHit) {
295 return OXTAGCLOUD_MINFONT;
298 $iFontDiff = OXTAGCLOUD_MAXFONT - OXTAGCLOUD_MINFONT;
299 $iMaxHitDiff = $iMaxHit - OXTAGCLOUD_MINOCCURENCETOSHOW;
300 $iHitDiff = $iHit - OXTAGCLOUD_MINOCCURENCETOSHOW;
306 $iSize = round($iHitDiff * $iFontDiff / $iMaxHitDiff) + OXTAGCLOUD_MINFONT;