OXID eShop CE  4.9.8
 All Classes Files Functions Variables Pages
oxrssfeed.php
Go to the documentation of this file.
1 <?php
2 
8 class oxRssFeed extends oxSuperCfg
9 {
10 
14  const CACHE_TTL = 10800;
15 
19  const RSS_TOPSHOP = 'RSS_TopShop';
20  const RSS_NEWARTS = 'RSS_NewArts';
21  const RSS_CATARTS = 'RSS_CatArts';
22  const RSS_ARTRECOMMLISTS = 'RSS_ARTRECOMMLISTS';
23  const RSS_RECOMMLISTARTS = 'RSS_RECOMMLISTARTS';
24  const RSS_BARGAIN = 'RSS_Bargain';
25 
32  protected $_aChannel = array();
33 
41  public function mapOxActionToFileCache($sOxActionId)
42  {
43  $aOxActionToCacheIds = array(
44  'oxbargain' => 'RSS_BARGAIN',
45  'oxtop5' => 'RSS_TopShop',
46  'oxnewest' => 'RSS_NewArts'
47  );
48 
49  $sFileCacheName = $aOxActionToCacheIds[$sOxActionId];
50 
51  if (is_null($sFileCacheName)) {
52  $sFileCacheName = '';
53  }
54 
55  return $sFileCacheName;
56  }
57 
64  public function getChannel()
65  {
66  return $this->_aChannel;
67  }
68 
74  public function removeCacheFile($sName)
75  {
76  $sFileKey = $this->mapOxActionToFileCache($sName);
77  $sFilePath = oxRegistry::getUtils()->getCacheFilePath($this->_getCacheId($sFileKey));
78 
79  $this->_deleteFile($sFilePath);
80  }
81 
87  protected function _loadBaseChannel()
88  {
89  $oShop = $this->getConfig()->getActiveShop();
90  $this->_aChannel['title'] = $oShop->oxshops__oxname->value;
91  $this->_aChannel['link'] = oxRegistry::get("oxUtilsUrl")->prepareUrlForNoSession($this->getConfig()->getShopUrl());
92  $this->_aChannel['description'] = '';
93  $oLang = oxRegistry::getLang();
94  $aLangIds = $oLang->getLanguageIds();
95  $this->_aChannel['language'] = $aLangIds[$oLang->getBaseLanguage()];
96  $this->_aChannel['copyright'] = $oShop->oxshops__oxname->value;
97  $this->_aChannel['selflink'] = '';
98  if (oxRegistry::getUtils()->isValidEmail($oShop->oxshops__oxinfoemail->value)) {
99  $this->_aChannel['managingEditor'] = $oShop->oxshops__oxinfoemail->value;
100  if ($oShop->oxshops__oxfname) {
101  $this->_aChannel['managingEditor'] .= " ({$oShop->oxshops__oxfname} {$oShop->oxshops__oxlname})";
102  }
103  }
104  //$this->_aChannel['webMaster'] = '';
105 
106  $this->_aChannel['generator'] = $oShop->oxshops__oxname->value;
107  $this->_aChannel['image']['url'] = $this->getConfig()->getImageUrl() . 'logo.png';
108 
109 
110  $this->_aChannel['image']['title'] = $this->_aChannel['title'];
111  $this->_aChannel['image']['link'] = $this->_aChannel['link'];
112  }
113 
122  protected function _getCacheId($name)
123  {
124  $oConfig = $this->getConfig();
125 
126  return $name . '_' . $oConfig->getShopId() . '_' . oxRegistry::getLang()->getBaseLanguage() . '_' . (int) $oConfig->getShopCurrency();
127  }
128 
137  protected function _loadFromCache($name)
138  {
139  if ($aRes = oxRegistry::getUtils()->fromFileCache($this->_getCacheId($name))) {
140  if ($aRes['timestamp'] > time() - self::CACHE_TTL) {
141  return $aRes['content'];
142  }
143  }
144 
145  return false;
146  }
147 
148 
159  protected function _getLastBuildDate($name, $aData)
160  {
161  if ($aData2 = oxRegistry::getUtils()->fromFileCache($this->_getCacheId($name))) {
162  $sLastBuildDate = $aData2['content']['lastBuildDate'];
163  $aData2['content']['lastBuildDate'] = '';
164  $aData['lastBuildDate'] = '';
165  if (!strcmp(serialize($aData), serialize($aData2['content']))) {
166  return $sLastBuildDate;
167  }
168  }
169 
170  return date('D, d M Y H:i:s O');
171  }
172 
185  protected function _saveToCache($name, $aContent)
186  {
187  $aData = array('timestamp' => time(), 'content' => $aContent);
188 
189  return oxRegistry::getUtils()->toFileCache($this->_getCacheId($name), $aData);
190  }
191 
192 
201  protected function _getArticleItems(oxArticleList $oList)
202  {
203  $myUtilsUrl = oxRegistry::get("oxUtilsUrl");
204  $aItems = array();
205  $oLang = oxRegistry::getLang();
206  $oStr = getStr();
207 
208  foreach ($oList as $oArticle) {
209  $oItem = new stdClass();
210  $oActCur = $this->getConfig()->getActShopCurrencyObject();
211  $sPrice = '';
212  if ($oPrice = $oArticle->getPrice()) {
213  $sFrom = ($oArticle->isRangePrice()) ? oxRegistry::getLang()->translateString('PRICE_FROM') : '';
214  $sPrice .= ' ' . $sFrom . $oLang->formatCurrency($oPrice->getBruttoPrice(), $oActCur) . " " . $oActCur->sign;
215  }
216  $oItem->title = strip_tags($oArticle->oxarticles__oxtitle->value . $sPrice);
217  $oItem->guid = $oItem->link = $myUtilsUrl->prepareUrlForNoSession($oArticle->getLink());
218  $oItem->isGuidPermalink = true;
219  // $oItem->description = $oArticle->getLongDescription()->value; //oxarticles__oxshortdesc->value;
220  //#4038: Smarty not parsed in RSS, although smarty parsing activated for longdescriptions
221  if (oxRegistry::getConfig()->getConfigParam('bl_perfParseLongDescinSmarty')) {
222  $oItem->description = $oArticle->getLongDesc();
223  } else {
224  $oItem->description = $oArticle->getLongDescription()->value;
225  }
226 
227  if (trim(str_replace('&nbsp;', '', (strip_tags($oItem->description)))) == '') {
228  $oItem->description = $oArticle->oxarticles__oxshortdesc->value;
229  }
230 
231  $oItem->description = trim($oItem->description);
232  if ($sThumb = $oArticle->getThumbnailUrl()) {
233  $oItem->description = "<img src='$sThumb' border=0 align='left' hspace=5>" . $oItem->description;
234  }
235  $oItem->description = $oStr->htmlspecialchars($oItem->description);
236 
237  if ($oArticle->oxarticles__oxtimestamp->value) {
238  list($date, $time) = explode(' ', $oArticle->oxarticles__oxtimestamp->value);
239  $date = explode('-', $date);
240  $time = explode(':', $time);
241  $oItem->date = date('D, d M Y H:i:s O', mktime($time[0], $time[1], $time[2], $date[1], $date[2], $date[0]));
242  } else {
243  $oItem->date = date('D, d M Y H:i:s O', time());
244  }
245 
246  $aItems[] = $oItem;
247  }
248 
249  return $aItems;
250  }
251 
262  protected function _prepareUrl($sUri, $sTitle)
263  {
264  $iLang = oxRegistry::getLang()->getBaseLanguage();
265  $sUrl = $this->_getShopUrl();
266  $sUrl .= $sUri . '&amp;lang=' . $iLang;
267 
268  if (oxRegistry::getUtils()->seoIsActive()) {
269  $oEncoder = oxRegistry::get("oxSeoEncoder");
270  $sUrl = $oEncoder->getDynamicUrl($sUrl, "rss/{$sTitle}/", $iLang);
271  }
272 
273  return oxRegistry::get("oxUtilsUrl")->prepareUrlForNoSession($sUrl);
274  }
275 
285  protected function _prepareFeedName($sTitle)
286  {
287  $oShop = $this->getConfig()->getActiveShop();
288 
289  return $oShop->oxshops__oxname->value . "/" . $sTitle;
290  }
291 
298  protected function _getShopUrl()
299  {
300  $sUrl = $this->getConfig()->getShopUrl();
301  $oStr = getStr();
302  if ($oStr->strpos($sUrl, '?') !== false) {
303  if (!$oStr->preg_match('/[?&](amp;)?$/i', $sUrl)) {
304  $sUrl .= '&amp;';
305  }
306  } else {
307  $sUrl .= '?';
308  }
309 
310  return $sUrl;
311  }
312 
325  protected function _loadData($sTag, $sTitle, $sDesc, $aItems, $sRssUrl, $sTargetUrl = null)
326  {
327  $this->_loadBaseChannel();
328 
329  $this->_aChannel['selflink'] = $sRssUrl;
330 
331  if ($sTargetUrl) {
332  $this->_aChannel['link'] = $this->_aChannel['image']['link'] = $sTargetUrl;
333  }
334 
335  $this->_aChannel['image']['title'] = $this->_aChannel['title'] = $sTitle;
336  $this->_aChannel['image']['description'] = $this->_aChannel['description'] = $sDesc;
337 
338  $this->_aChannel['items'] = $aItems;
339 
340  if ($sTag) {
341  $this->_aChannel['lastBuildDate'] = $this->_getLastBuildDate($sTag, $this->_aChannel);
342  $this->_saveToCache($sTag, $this->_aChannel);
343  } else {
344  $this->_aChannel['lastBuildDate'] = date('D, d M Y H:i:s O', oxRegistry::get("oxUtilsDate")->getTime());
345  }
346  }
347 
355  public function getTopInShopTitle()
356  {
357  $oLang = oxRegistry::getLang();
358  $iLang = $oLang->getBaseLanguage();
359 
360  return $this->_prepareFeedName($oLang->translateString('TOP_OF_THE_SHOP', $iLang));
361  }
362 
370  public function getTopInShopUrl()
371  {
372  return $this->_prepareUrl("cl=rss&amp;fnc=topshop", $this->getTopInShopTitle());
373  }
374 
382  public function loadTopInShop()
383  {
384  if (($this->_aChannel = $this->_loadFromCache(self::RSS_TOPSHOP))) {
385  return;
386  }
387 
388  $oArtList = oxNew('oxarticlelist');
389  $oArtList->loadTop5Articles($this->getConfig()->getConfigParam('iRssItemsCount'));
390 
391  $oLang = oxRegistry::getLang();
392  $this->_loadData(
393  self::RSS_TOPSHOP,
394  $this->getTopInShopTitle(),
395  $oLang->translateString('TOP_SHOP_PRODUCTS', $oLang->getBaseLanguage()),
396  $this->_getArticleItems($oArtList),
397  $this->getTopInShopUrl()
398  );
399  }
400 
401 
409  public function getNewestArticlesTitle()
410  {
411  $oLang = oxRegistry::getLang();
412  $iLang = $oLang->getBaseLanguage();
413 
414  return $this->_prepareFeedName($oLang->translateString('NEWEST_SHOP_PRODUCTS', $iLang));
415  }
416 
424  public function getNewestArticlesUrl()
425  {
426  return $this->_prepareUrl("cl=rss&amp;fnc=newarts", $this->getNewestArticlesTitle());
427  }
428 
436  public function loadNewestArticles()
437  {
438  if (($this->_aChannel = $this->_loadFromCache(self::RSS_NEWARTS))) {
439  return;
440  }
441  $oArtList = oxNew('oxarticlelist');
442  $oArtList->loadNewestArticles($this->getConfig()->getConfigParam('iRssItemsCount'));
443 
444  $oLang = oxRegistry::getLang();
445  $this->_loadData(
446  self::RSS_NEWARTS,
447  $this->getNewestArticlesTitle(),
448  $oLang->translateString('NEWEST_SHOP_PRODUCTS', $oLang->getBaseLanguage()),
449  $this->_getArticleItems($oArtList),
450  $this->getNewestArticlesUrl()
451  );
452  }
453 
454 
464  public function getCategoryArticlesTitle(oxCategory $oCat)
465  {
466  $oLang = oxRegistry::getLang();
467  $iLang = $oLang->getBaseLanguage();
468  $sTitle = $this->_getCatPath($oCat);
469 
470  return $this->_prepareFeedName($sTitle . $oLang->translateString('PRODUCTS', $iLang));
471  }
472 
480  protected function _getCatPath($oCat)
481  {
482  $sCatPathString = '';
483  $sSep = '';
484  while ($oCat) {
485  // prepare oCat title part
486  $sCatPathString = $oCat->oxcategories__oxtitle->value . $sSep . $sCatPathString;
487  $sSep = '/';
488  // load parent
489  $oCat = $oCat->getParentCategory();
490  }
491 
492  return $sCatPathString;
493  }
494 
504  public function getCategoryArticlesUrl(oxCategory $oCat)
505  {
506  $oLang = oxRegistry::getLang();
507 
508  return $this->_prepareUrl(
509  "cl=rss&amp;fnc=catarts&amp;cat=" . urlencode($oCat->getId()),
510  sprintf($oLang->translateString('CATEGORY_PRODUCTS_S', $oLang->getBaseLanguage()), $oCat->oxcategories__oxtitle->value)
511  );
512  }
513 
523  public function loadCategoryArticles(oxCategory $oCat)
524  {
525  $sId = $oCat->getId();
526  if (($this->_aChannel = $this->_loadFromCache(self::RSS_CATARTS . $sId))) {
527  return;
528  }
529 
530  $oArtList = oxNew('oxarticlelist');
531  $oArtList->setCustomSorting('oc.oxtime desc');
532  $oArtList->loadCategoryArticles($oCat->getId(), null, $this->getConfig()->getConfigParam('iRssItemsCount'));
533 
534  $oLang = oxRegistry::getLang();
535  $this->_loadData(
536  self::RSS_CATARTS . $sId,
537  $this->getCategoryArticlesTitle($oCat),
538  sprintf($oLang->translateString('S_CATEGORY_PRODUCTS', $oLang->getBaseLanguage()), $oCat->oxcategories__oxtitle->value),
539  $this->_getArticleItems($oArtList),
540  $this->getCategoryArticlesUrl($oCat),
541  $oCat->getLink()
542  );
543  }
544 
545 
558  public function getSearchArticlesTitle($sSearch, $sCatId, $sVendorId, $sManufacturerId)
559  {
560  return $this->_prepareFeedName(getStr()->htmlspecialchars($this->_getSearchParamsTranslation('SEARCH_FOR_PRODUCTS_CATEGORY_VENDOR_MANUFACTURER', $sSearch, $sCatId, $sVendorId, $sManufacturerId)));
561  }
562 
575  protected function _getSearchParamsUrl($sSearch, $sCatId, $sVendorId, $sManufacturerId)
576  {
577  $sParams = "searchparam=" . urlencode($sSearch);
578  if ($sCatId) {
579  $sParams .= "&amp;searchcnid=" . urlencode($sCatId);
580  }
581 
582  if ($sVendorId) {
583  $sParams .= "&amp;searchvendor=" . urlencode($sVendorId);
584  }
585 
586  if ($sManufacturerId) {
587  $sParams .= "&amp;searchmanufacturer=" . urlencode($sManufacturerId);
588  }
589 
590  return $sParams;
591  }
592 
603  protected function _getObjectField($sId, $sObject, $sField)
604  {
605  if (!$sId) {
606  return '';
607  }
608  $oObj = oxNew($sObject);
609  if ($oObj->load($sId)) {
610  return $oObj->$sField->value;
611  }
612 
613  return '';
614  }
615 
629  protected function _getSearchParamsTranslation($sSearch, $sId, $sCatId, $sVendorId, $sManufacturerId)
630  {
631  $oLang = oxRegistry::getLang();
632  $sCatTitle = '';
633  if ($sTitle = $this->_getObjectField($sCatId, 'oxcategory', 'oxcategories__oxtitle')) {
634  $sCatTitle = sprintf($oLang->translateString('CATEGORY_S', $oLang->getBaseLanguage()), $sTitle);
635  }
636  $sVendorTitle = '';
637  if ($sTitle = $this->_getObjectField($sVendorId, 'oxvendor', 'oxvendor__oxtitle')) {
638  $sVendorTitle = sprintf($oLang->translateString('VENDOR_S', $oLang->getBaseLanguage()), $sTitle);
639  }
640  $sManufacturerTitle = '';
641  if ($sTitle = $this->_getObjectField($sManufacturerId, 'oxmanufacturer', 'oxmanufacturers__oxtitle')) {
642  $sManufacturerTitle = sprintf($oLang->translateString('MANUFACTURER_S', $oLang->getBaseLanguage()), $sTitle);
643  }
644 
645  $sRet = sprintf($oLang->translateString($sSearch, $oLang->getBaseLanguage()), $sId);
646 
647  $sRet = str_replace('<TAG_CATEGORY>', $sCatTitle, $sRet);
648  $sRet = str_replace('<TAG_VENDOR>', $sVendorTitle, $sRet);
649  $sRet = str_replace('<TAG_MANUFACTURER>', $sManufacturerTitle, $sRet);
650 
651  return $sRet;
652  }
653 
666  public function getSearchArticlesUrl($sSearch, $sCatId, $sVendorId, $sManufacturerId)
667  {
668  $oLang = oxRegistry::getLang();
669  $sUrl = $this->_prepareUrl("cl=rss&amp;fnc=searcharts", $oLang->translateString('SEARCH', $oLang->getBaseLanguage()));
670 
671  $sJoin = '?';
672  if (strpos($sUrl, '?') !== false) {
673  $sJoin = '&amp;';
674  }
675 
676  return $sUrl . $sJoin . $this->_getSearchParamsUrl($sSearch, $sCatId, $sVendorId, $sManufacturerId);
677  }
678 
689  public function loadSearchArticles($sSearch, $sCatId, $sVendorId, $sManufacturerId)
690  {
691  // dont use cache for search
692  //if ($this->_aChannel = $this->_loadFromCache(self::RSS_SEARCHARTS.md5($sSearch.$sCatId.$sVendorId))) {
693  // return;
694  //}
695 
696  $oConfig = $this->getConfig();
697  $oConfig->setConfigParam('iNrofCatArticles', $oConfig->getConfigParam('iRssItemsCount'));
698 
699  $oArtList = oxNew('oxsearch')->getSearchArticles($sSearch, $sCatId, $sVendorId, $sManufacturerId, oxNew('oxarticle')->getViewName() . '.oxtimestamp desc');
700 
701  $this->_loadData(
702  // dont use cache for search
703  null,
704  //self::RSS_SEARCHARTS.md5($sSearch.$sCatId.$sVendorId),
705  $this->getSearchArticlesTitle($sSearch, $sCatId, $sVendorId, $sManufacturerId),
706  $this->_getSearchParamsTranslation('SEARCH_FOR_PRODUCTS_CATEGORY_VENDOR_MANUFACTURER', getStr()->htmlspecialchars($sSearch), $sCatId, $sVendorId, $sManufacturerId),
707  $this->_getArticleItems($oArtList),
708  $this->getSearchArticlesUrl($sSearch, $sCatId, $sVendorId, $sManufacturerId),
709  $this->_getShopUrl() . "cl=search&amp;" . $this->_getSearchParamsUrl($sSearch, $sCatId, $sVendorId, $sManufacturerId)
710  );
711  }
712 
720  public function getRecommListsTitle(oxArticle $oArticle)
721  {
722  $oLang = oxRegistry::getLang();
723  $iLang = $oLang->getBaseLanguage();
724 
725  return $this->_prepareFeedName(sprintf($oLang->translateString('LISTMANIA_LIST_FOR', $iLang), $oArticle->oxarticles__oxtitle->value));
726  }
727 
735  public function getRecommListsUrl(oxArticle $oArticle)
736  {
737  $oLang = oxRegistry::getLang();
738  $iLang = $oLang->getBaseLanguage();
739 
740  return $this->_prepareUrl(
741  "cl=rss&amp;fnc=recommlists&amp;anid=" . $oArticle->getId(),
742  $oLang->translateString("LISTMANIA", $iLang) . "/" . $oArticle->oxarticles__oxtitle->value
743  );
744  }
745 
753  protected function _getRecommListItems($oList)
754  {
755  $myUtilsUrl = oxRegistry::get("oxUtilsUrl");
756  $aItems = array();
757  foreach ($oList as $oRecommList) {
758  $oItem = new stdClass();
759  $oItem->title = $oRecommList->oxrecommlists__oxtitle->value;
760  $oItem->guid = $oItem->link = $myUtilsUrl->prepareUrlForNoSession($oRecommList->getLink());
761  $oItem->isGuidPermalink = true;
762  $oItem->description = $oRecommList->oxrecommlists__oxdesc->value;
763 
764  $aItems[] = $oItem;
765  }
766 
767  return $aItems;
768  }
769 
777  public function loadRecommLists(oxArticle $oArticle)
778  {
779  if (($this->_aChannel = $this->_loadFromCache(self::RSS_ARTRECOMMLISTS . $oArticle->getId()))) {
780  return;
781  }
782 
783  $oConfig = $this->getConfig();
784  $oConfig->setConfigParam('iNrofCrossellArticles', $oConfig->getConfigParam('iRssItemsCount'));
785 
786  $oList = oxNew('oxrecommlist')->getRecommListsByIds(array($oArticle->getId()));
787  if ($oList == null) {
788  $oList = oxNew('oxlist');
789  }
790 
791  $oLang = oxRegistry::getLang();
792  $this->_loadData(
793  self::RSS_ARTRECOMMLISTS . $oArticle->getId(),
794  $this->getRecommListsTitle($oArticle),
795  sprintf($oLang->translateString('LISTMANIA_LIST_FOR', $oLang->getBaseLanguage()), $oArticle->oxarticles__oxtitle->value),
796  $this->_getRecommListItems($oList),
797  $this->getRecommListsUrl($oArticle),
798  $oArticle->getLink()
799  );
800  }
801 
809  public function getRecommListArticlesTitle(oxRecommList $oRecommList)
810  {
811  $oLang = oxRegistry::getLang();
812  $iLang = $oLang->getBaseLanguage();
813 
814  return $this->_prepareFeedName(sprintf($oLang->translateString('LISTMANIA_LIST_PRODUCTS', $iLang), $oRecommList->oxrecommlists__oxtitle->value));
815  }
816 
824  public function getRecommListArticlesUrl(oxRecommList $oRecommList)
825  {
826  $oLang = oxRegistry::getLang();
827  $iLang = $oLang->getBaseLanguage();
828 
829  return $this->_prepareUrl(
830  "cl=rss&amp;fnc=recommlistarts&amp;recommid=" . $oRecommList->getId(),
831  $oLang->translateString("LISTMANIA", $iLang) . "/" . $oRecommList->oxrecommlists__oxtitle->value
832  );
833  }
834 
842  public function loadRecommListArticles(oxRecommList $oRecommList)
843  {
844  if (($this->_aChannel = $this->_loadFromCache(self::RSS_RECOMMLISTARTS . $oRecommList->getId()))) {
845  return;
846  }
847 
848  $oList = oxNew('oxarticlelist');
849  $oList->loadRecommArticles($oRecommList->getId(), ' order by oxobject2list.oxtimestamp desc limit ' . $this->getConfig()->getConfigParam('iRssItemsCount'));
850 
851  $oLang = oxRegistry::getLang();
852  $this->_loadData(
853  self::RSS_RECOMMLISTARTS . $oRecommList->getId(),
854  $this->getRecommListArticlesTitle($oRecommList),
855  sprintf($oLang->translateString('LISTMANIA_LIST_PRODUCTS', $oLang->getBaseLanguage()), $oRecommList->oxrecommlists__oxtitle->value),
856  $this->_getArticleItems($oList),
857  $this->getRecommListArticlesUrl($oRecommList),
858  $oRecommList->getLink()
859  );
860  }
861 
869  public function getBargainTitle()
870  {
871  $oLang = oxRegistry::getLang();
872  $iLang = $oLang->getBaseLanguage();
873 
874  return $this->_prepareFeedName($oLang->translateString('BARGAIN', $iLang));
875  }
876 
884  public function getBargainUrl()
885  {
886  return $this->_prepareUrl("cl=rss&amp;fnc=bargain", $this->getBargainTitle());
887  }
888 
896  public function loadBargain()
897  {
898  if (($this->_aChannel = $this->_loadFromCache(self::RSS_BARGAIN))) {
899  return;
900  }
901 
902  $oArtList = oxNew('oxarticlelist');
903  $oArtList->loadActionArticles('OXBARGAIN', $this->getConfig()->getConfigParam('iRssItemsCount'));
904 
905  $oLang = oxRegistry::getLang();
906  $this->_loadData(
907  self::RSS_BARGAIN,
908  $this->getBargainTitle(),
909  $oLang->translateString('BARGAIN_PRODUCTS', $oLang->getBaseLanguage()),
910  $this->_getArticleItems($oArtList),
911  $this->getBargainUrl()
912  );
913  }
914 
920  public function getCacheTtl()
921  {
922  return self::CACHE_TTL;
923  }
924 
932  protected function _deleteFile($sFilePath)
933  {
934  return @unlink($sFilePath);
935  }
936 }