3 if (!defined(
'OXTAGCLOUD_MINFONT')) {
4 define(
'OXTAGCLOUD_MINFONT', 100);
5 define(
'OXTAGCLOUD_MAXFONT', 400);
6 define(
'OXTAGCLOUD_MINOCCURENCETOSHOW', 2);
7 define(
'OXTAGCLOUD_STARTPAGECOUNT', 20);
8 define(
'OXTAGCLOUD_EXTENDEDCOUNT', 200);
79 $this->_blExtended = $blExtended;
99 $this->_oTagList = $oTagList;
109 return $this->_oTagList;
120 $this->_aCloudArray[$sCacheIdent] = $aTagCloudArray;
131 if (!isset($this->_aCloudArray[$sCacheIdent])) {
134 $this->_aCloudArray[$sCacheIdent] = $this->
formCloudArray($oTagList);
137 return $this->_aCloudArray[$sCacheIdent];
154 $aCloudArray = $myUtils->fromFileCache($sCacheIdent);
158 if ($aCloudArray === null) {
160 $oTagSet = $oTagList->
get();
162 $oTagSet->sortByHitCount();
166 $aCloudArray = $oTagSet->get();
169 $myUtils->toFileCache($sCacheIdent, $aCloudArray);
186 if (is_null($aCloudArray[$sTag])) {
192 return floor($iCurrSize / OXTAGCLOUD_MINFONT) * OXTAGCLOUD_MINFONT;
203 return OXTAGCLOUD_EXTENDEDCOUNT;
205 return OXTAGCLOUD_STARTPAGECOUNT;
217 $this->setLanguageId($iLang);
230 if (($oTagList = $this->
getTagList()) !== null) {
231 $sCacheId = $oTagList->getCacheId();
234 $myUtils->toFileCache($this->
_formCacheKey($sCacheId), null);
236 $this->_aCloudArray = null;
250 return $this->_sCacheKey .
"_" . $this->
getConfig()->getShopId() .
"_" . $sExtended .
"_" . $sTagListCacheId;
260 if ($this->_iMaxHit === null) {
261 $aHits = array_map(array($this,
'_getTagHitCount'), $this->
getCloudArray());
262 $this->_iMaxHit = max($aHits);
277 return $oTag->getHitCount();
291 if ($iMaxHit <= OXTAGCLOUD_MINOCCURENCETOSHOW || !$iMaxHit) {
292 return OXTAGCLOUD_MINFONT;
295 $iFontDiff = OXTAGCLOUD_MAXFONT - OXTAGCLOUD_MINFONT;
296 $iMaxHitDiff = $iMaxHit - OXTAGCLOUD_MINOCCURENCETOSHOW;
297 $iHitDiff = $iHit - OXTAGCLOUD_MINOCCURENCETOSHOW;
303 $iSize = round($iHitDiff * $iFontDiff / $iMaxHitDiff) + OXTAGCLOUD_MINFONT;