OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Application\Model\RssFeed Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Application\Model\RssFeed:
+ Collaboration diagram for OxidEsales\EshopCommunity\Application\Model\RssFeed:

Public Member Functions

 mapOxActionToFileCache ($sOxActionId)
 
 getChannel ()
 
 removeCacheFile ($sName)
 
 getTopInShopTitle ()
 
 getTopInShopUrl ()
 
 loadTopInShop ()
 
 getNewestArticlesTitle ()
 
 getNewestArticlesUrl ()
 
 loadNewestArticles ()
 
 getCategoryArticlesTitle (\OxidEsales\Eshop\Application\Model\Category $oCat)
 
 getCategoryArticlesUrl (\OxidEsales\Eshop\Application\Model\Category $oCat)
 
 loadCategoryArticles (\OxidEsales\Eshop\Application\Model\Category $oCat)
 
 getSearchArticlesTitle ($sSearch, $sCatId, $sVendorId, $sManufacturerId)
 
 getSearchArticlesUrl ($sSearch, $sCatId, $sVendorId, $sManufacturerId)
 
 loadSearchArticles ($sSearch, $sCatId, $sVendorId, $sManufacturerId)
 
 getRecommListsTitle (\OxidEsales\Eshop\Application\Model\Article $oArticle)
 
 getRecommListsUrl (\OxidEsales\Eshop\Application\Model\Article $oArticle)
 
 loadRecommLists (\OxidEsales\Eshop\Application\Model\Article $oArticle)
 
 getRecommListArticlesTitle (\OxidEsales\Eshop\Application\Model\RecommendationList $oRecommList)
 
 getRecommListArticlesUrl (\OxidEsales\Eshop\Application\Model\RecommendationList $oRecommList)
 
 loadRecommListArticles (\OxidEsales\Eshop\Application\Model\RecommendationList $oRecommList)
 
 getBargainTitle ()
 
 getBargainUrl ()
 
 loadBargain ()
 
 getCacheTtl ()
 

Public Attributes

const CACHE_TTL = 10800
 
const RSS_TOPSHOP = 'RSS_TopShop'
 
const RSS_NEWARTS = 'RSS_NewArts'
 
const RSS_CATARTS = 'RSS_CatArts'
 
const RSS_ARTRECOMMLISTS = 'RSS_ARTRECOMMLISTS'
 
const RSS_RECOMMLISTARTS = 'RSS_RECOMMLISTARTS'
 
const RSS_BARGAIN = 'RSS_Bargain'
 

Protected Member Functions

 _loadBaseChannel ()
 
 _getCacheId ($name)
 
 _loadFromCache ($name)
 
 _getLastBuildDate ($name, $aData)
 
 _saveToCache ($name, $aContent)
 
 _getArticleItems (\OxidEsales\Eshop\Application\Model\ArticleList $oList)
 
 _prepareUrl ($sUri, $sTitle)
 
 _prepareFeedName ($sTitle)
 
 _getShopUrl ()
 
 _loadData ($sTag, $sTitle, $sDesc, $aItems, $sRssUrl, $sTargetUrl=null)
 
 _getCatPath ($oCat)
 
 _getSearchParamsUrl ($sSearch, $sCatId, $sVendorId, $sManufacturerId)
 
 _getObjectField ($sId, $sObject, $sField)
 
 _getSearchParamsTranslation ($sSearch, $sId, $sCatId, $sVendorId, $sManufacturerId)
 
 _getRecommListItems ($oList)
 
 _deleteFile ($sFilePath)
 

Protected Attributes

 $_aChannel = []
 

Detailed Description

Rss feed manager loads needed rss data

Member Function Documentation

◆ _deleteFile()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_deleteFile (   $sFilePath)
protected

Delete the file, given by its path.

Parameters
string$sFilePathThe path of the file we want to delete.
Returns
bool Went everything well?

◆ _getArticleItems()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getArticleItems ( \OxidEsales\Eshop\Application\Model\ArticleList  $oList)
protected

_getArticleItems create channel items from article list

Parameters
\OxidEsales\Eshop\Application\Model\ArticleList$oListarticle list

@access protected

Returns
array

◆ _getCacheId()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getCacheId (   $name)
protected

_getCacheId retrieve cache id

Parameters
string$namecache name

@access protected

Returns
string

◆ _getCatPath()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getCatPath (   $oCat)
protected

Returns string built from category titles

Parameters
\OxidEsales\Eshop\Application\Model\Category$oCatcategory object
Returns
string

◆ _getLastBuildDate()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getLastBuildDate (   $name,
  $aData 
)
protected

_getLastBuildDate check if changed data and renew last build date if needed returns result as string

Parameters
string$nameRss data Id
array$aDatachannel data

@access protected

Returns
string

◆ _getObjectField()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getObjectField (   $sId,
  $sObject,
  $sField 
)
protected

loads object and returns specified field

Parameters
string$sIdobject id
string$sObjectobject class
string$sFieldobject field to be taken

@access protected

Returns
string

◆ _getRecommListItems()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getRecommListItems (   $oList)
protected

make rss data array from given oxlist

Parameters
\OxidEsales\Eshop\Core\Model\ListModel$oListrecommlist object
Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.
Returns
array

◆ _getSearchParamsTranslation()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getSearchParamsTranslation (   $sSearch,
  $sId,
  $sCatId,
  $sVendorId,
  $sManufacturerId 
)
protected

_getSearchParamsTranslation translates text for given lang id loads category and vendor to take their titles.

Parameters
string$sSearchsearch param
string$sIdlanguage id
string$sCatIdcategory id
string$sVendorIdvendor id
string$sManufacturerIdManufacturer id

@access protected

Returns
string

◆ _getSearchParamsUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getSearchParamsUrl (   $sSearch,
  $sCatId,
  $sVendorId,
  $sManufacturerId 
)
protected

_getSearchParamsUrl return search parameters for url

Parameters
string$sSearchsearch string
string$sCatIdcategory id
string$sVendorIdvendor id
string$sManufacturerIdManufacturer id

@access protected

Returns
string

◆ _getShopUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_getShopUrl ( )
protected

_getShopUrl returns shop home url

@access protected

Returns
string

◆ _loadBaseChannel()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_loadBaseChannel ( )
protected

_loadBaseChannel loads basic channel data

@access protected

◆ _loadData()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_loadData (   $sTag,
  $sTitle,
  $sDesc,
  $aItems,
  $sRssUrl,
  $sTargetUrl = null 
)
protected

_loadData loads given data to channel

Parameters
string$sTagtag
string$sTitleobject title
string$sDescobject description
array$aItemsitems data to be put to rss
string$sRssUrlurl of rss page
string$sTargetUrlurl of page rss represents

@access protected

◆ _loadFromCache()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_loadFromCache (   $name)
protected

_loadFromCache load data from cache, requires Rss data Id

Parameters
string$nameRss data Id

@access protected

Returns
array

◆ _prepareFeedName()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_prepareFeedName (   $sTitle)
protected

_prepareFeedName adds shop name to feed title

Parameters
string$sTitlepage title

@access protected

Returns
string

◆ _prepareUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_prepareUrl (   $sUri,
  $sTitle 
)
protected

_prepareUrl make url from uri

Parameters
string$sUristandard uri
string$sTitlepage title

@access protected

Returns
string

◆ _saveToCache()

OxidEsales\EshopCommunity\Application\Model\RssFeed::_saveToCache (   $name,
  $aContent 
)
protected

_saveToCache writes generated rss data to cache returns true on successfull write, false otherwise A successfull write means only write ok AND data has actually changed if give

Parameters
string$namecache name
array$aContentdata to be saved

@access protected

Returns
void

◆ getBargainTitle()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getBargainTitle ( )

getBargainTitle get title for 'Bargain' rss feed

@access public

Returns
string

◆ getBargainUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getBargainUrl ( )

getBargainUrl get url for 'Bargain' rss feed

@access public

Returns
string

◆ getCacheTtl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getCacheTtl ( )

Returns timestamp of defind cache time to live

Returns
integer

◆ getCategoryArticlesTitle()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getCategoryArticlesTitle ( \OxidEsales\Eshop\Application\Model\Category  $oCat)

get title for 'Category Articles' rss feed

Parameters
\OxidEsales\Eshop\Application\Model\Category$oCatcategory object

@access public

Returns
string

◆ getCategoryArticlesUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getCategoryArticlesUrl ( \OxidEsales\Eshop\Application\Model\Category  $oCat)

getCategoryArticlesUrl get url for 'Category Articles' rss feed

Parameters
\OxidEsales\Eshop\Application\Model\Category$oCatcategory object

@access public

Returns
string

◆ getChannel()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getChannel ( )

getChannel retrieve channel data

@access public

Returns
array

◆ getNewestArticlesTitle()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getNewestArticlesTitle ( )

get title for 'Newest Shop Articles' rss feed

@access public

Returns
string

◆ getNewestArticlesUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getNewestArticlesUrl ( )

getNewestArticlesUrl get url for 'Newest Shop Articles' rss feed

@access public

Returns
string

◆ getRecommListArticlesTitle()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getRecommListArticlesTitle ( \OxidEsales\Eshop\Application\Model\RecommendationList  $oRecommList)

get title for 'Recommendation list articles' rss feed

Parameters
\OxidEsales\Eshop\Application\Model\RecommendationList$oRecommListrecomm list to load articles from
Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.
Returns
string

◆ getRecommListArticlesUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getRecommListArticlesUrl ( \OxidEsales\Eshop\Application\Model\RecommendationList  $oRecommList)

get url for 'Recommendation lists' rss feed

Parameters
\OxidEsales\Eshop\Application\Model\RecommendationList$oRecommListrecomm list to load articles from
Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.
Returns
string

◆ getRecommListsTitle()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getRecommListsTitle ( \OxidEsales\Eshop\Application\Model\Article  $oArticle)

get title for 'Recommendation lists' rss feed

Parameters
\OxidEsales\Eshop\Application\Model\Article$oArticleload lists for this article
Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.
Returns
string

◆ getRecommListsUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getRecommListsUrl ( \OxidEsales\Eshop\Application\Model\Article  $oArticle)

get url for 'Recommendation lists' rss feed

Parameters
\OxidEsales\Eshop\Application\Model\Article$oArticleload lists for this article
Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.
Returns
string

◆ getSearchArticlesTitle()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getSearchArticlesTitle (   $sSearch,
  $sCatId,
  $sVendorId,
  $sManufacturerId 
)

get title for 'Search Articles' rss feed

Parameters
string$sSearchsearch string
string$sCatIdcategory id
string$sVendorIdvendor id
string$sManufacturerIdManufacturer id

@access public

Returns
string

◆ getSearchArticlesUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getSearchArticlesUrl (   $sSearch,
  $sCatId,
  $sVendorId,
  $sManufacturerId 
)

getSearchArticlesUrl get url for 'Search Articles' rss feed

Parameters
string$sSearchsearch string
string$sCatIdcategory id
string$sVendorIdvendor id
string$sManufacturerIdManufacturer id

@access public

Returns
string

◆ getTopInShopTitle()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getTopInShopTitle ( )

getTopShopTitle get title for 'Top of the Shop' rss feed

@access public

Returns
string

◆ getTopInShopUrl()

OxidEsales\EshopCommunity\Application\Model\RssFeed::getTopInShopUrl ( )

getTopShopUrl get url for 'Top of the Shop' rss feed

@access public

Returns
string

◆ loadBargain()

OxidEsales\EshopCommunity\Application\Model\RssFeed::loadBargain ( )

loadBargain loads 'Bargain' rss data

@access public

Returns
void

◆ loadCategoryArticles()

OxidEsales\EshopCommunity\Application\Model\RssFeed::loadCategoryArticles ( \OxidEsales\Eshop\Application\Model\Category  $oCat)

loadCategoryArticles loads 'Category Articles' rss data

Parameters
\OxidEsales\Eshop\Application\Model\Category$oCatcategory object

@access public

Returns
void

◆ loadNewestArticles()

OxidEsales\EshopCommunity\Application\Model\RssFeed::loadNewestArticles ( )

loadNewestArticles loads 'Newest Shop Articles' rss data

@access public

Returns
void

◆ loadRecommListArticles()

OxidEsales\EshopCommunity\Application\Model\RssFeed::loadRecommListArticles ( \OxidEsales\Eshop\Application\Model\RecommendationList  $oRecommList)

loads 'Recommendation lists' rss data

Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.
Parameters
\OxidEsales\Eshop\Application\Model\RecommendationList$oRecommListrecomm list to load articles from
Returns
null

◆ loadRecommLists()

OxidEsales\EshopCommunity\Application\Model\RssFeed::loadRecommLists ( \OxidEsales\Eshop\Application\Model\Article  $oArticle)

loads 'Recommendation lists' rss data

Parameters
\OxidEsales\Eshop\Application\Model\Article$oArticleload lists for this article
Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.
Returns
null

◆ loadSearchArticles()

OxidEsales\EshopCommunity\Application\Model\RssFeed::loadSearchArticles (   $sSearch,
  $sCatId,
  $sVendorId,
  $sManufacturerId 
)

loadSearchArticles loads 'Search Articles' rss data

Parameters
string$sSearchsearch string
string$sCatIdcategory id
string$sVendorIdvendor id
string$sManufacturerIdManufacturer id

@access public

◆ loadTopInShop()

OxidEsales\EshopCommunity\Application\Model\RssFeed::loadTopInShop ( )

loadTopShop loads 'Top of the Shop' rss data

@access public

Returns
void

◆ mapOxActionToFileCache()

OxidEsales\EshopCommunity\Application\Model\RssFeed::mapOxActionToFileCache (   $sOxActionId)

Give back the cache file name for the given oxActionId.

Parameters
string$sOxActionIdThe oxaction we want the cache file name for.
Returns
string The name of the corresponding file cache file.

◆ removeCacheFile()

OxidEsales\EshopCommunity\Application\Model\RssFeed::removeCacheFile (   $sName)

Expire/remove the cache file for the given action rss feed.

Parameters
string$sNameThe name of the stream we want to remove from the file cache.

Member Data Documentation

◆ $_aChannel

OxidEsales\EshopCommunity\Application\Model\RssFeed::$_aChannel = []
protected

◆ CACHE_TTL

const OxidEsales\EshopCommunity\Application\Model\RssFeed::CACHE_TTL = 10800

timeout in seconds for regenerating data (3h)

◆ RSS_ARTRECOMMLISTS

const OxidEsales\EshopCommunity\Application\Model\RssFeed::RSS_ARTRECOMMLISTS = 'RSS_ARTRECOMMLISTS'

◆ RSS_BARGAIN

const OxidEsales\EshopCommunity\Application\Model\RssFeed::RSS_BARGAIN = 'RSS_Bargain'

◆ RSS_CATARTS

const OxidEsales\EshopCommunity\Application\Model\RssFeed::RSS_CATARTS = 'RSS_CatArts'

◆ RSS_NEWARTS

const OxidEsales\EshopCommunity\Application\Model\RssFeed::RSS_NEWARTS = 'RSS_NewArts'

◆ RSS_RECOMMLISTARTS

const OxidEsales\EshopCommunity\Application\Model\RssFeed::RSS_RECOMMLISTARTS = 'RSS_RECOMMLISTARTS'

◆ RSS_TOPSHOP

const OxidEsales\EshopCommunity\Application\Model\RssFeed::RSS_TOPSHOP = 'RSS_TopShop'

Rss data Ids for cache


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