OXID eShop CE  4.10.7
 All Classes Namespaces Files Functions Variables Pages
oxRssFeed Class Reference
+ Inheritance diagram for oxRssFeed:
+ Collaboration diagram for oxRssFeed:

Public Member Functions

 mapOxActionToFileCache ($sOxActionId)
 getChannel ()
 removeCacheFile ($sName)
 getTopInShopTitle ()
 getTopInShopUrl ()
 loadTopInShop ()
 getNewestArticlesTitle ()
 getNewestArticlesUrl ()
 loadNewestArticles ()
 getCategoryArticlesTitle (oxCategory $oCat)
 getCategoryArticlesUrl (oxCategory $oCat)
 loadCategoryArticles (oxCategory $oCat)
 getSearchArticlesTitle ($sSearch, $sCatId, $sVendorId, $sManufacturerId)
 getSearchArticlesUrl ($sSearch, $sCatId, $sVendorId, $sManufacturerId)
 loadSearchArticles ($sSearch, $sCatId, $sVendorId, $sManufacturerId)
 getRecommListsTitle (oxArticle $oArticle)
 getRecommListsUrl (oxArticle $oArticle)
 loadRecommLists (oxArticle $oArticle)
 getRecommListArticlesTitle (oxRecommList $oRecommList)
 getRecommListArticlesUrl (oxRecommList $oRecommList)
 loadRecommListArticles (oxRecommList $oRecommList)
 getBargainTitle ()
 getBargainUrl ()
 loadBargain ()
 getCacheTtl ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

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 (oxArticleList $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 = array()

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Rss feed manager loads needed rss data

Definition at line 8 of file oxrssfeed.php.

Member Function Documentation

oxRssFeed::_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?

Definition at line 950 of file oxrssfeed.php.

oxRssFeed::_getArticleItems ( oxArticleList  $oList)
protected

_getArticleItems create channel items from article list

Parameters
oxArticleList$oListarticle list

protected

Returns
array

Definition at line 203 of file oxrssfeed.php.

oxRssFeed::_getCacheId (   $name)
protected

_getCacheId retrieve cache id

Parameters
string$namecache name

protected

Returns
string

Definition at line 124 of file oxrssfeed.php.

oxRssFeed::_getCatPath (   $oCat)
protected

Returns string built from category titles

Parameters
oxCategory$oCatcategory object
Returns
string

Definition at line 484 of file oxrssfeed.php.

oxRssFeed::_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

protected

Returns
string

Definition at line 161 of file oxrssfeed.php.

oxRssFeed::_getObjectField (   $sId,
  $sObject,
  $sField 
)
protected

loads object and returns specified field

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

protected

Returns
string

Definition at line 607 of file oxrssfeed.php.

oxRssFeed::_getRecommListItems (   $oList)
protected

make rss data array from given oxlist

Parameters
oxList$oListrecommlist object
Deprecated:
since v5.3 (2016-06-17); Listmania will be moved to an own module.
Returns
array

Definition at line 763 of file oxrssfeed.php.

oxRssFeed::_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

protected

Returns
string

Definition at line 633 of file oxrssfeed.php.

oxRssFeed::_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

protected

Returns
string

Definition at line 579 of file oxrssfeed.php.

oxRssFeed::_getShopUrl ( )
protected

_getShopUrl returns shop home url

protected

Returns
string

Definition at line 300 of file oxrssfeed.php.

oxRssFeed::_loadBaseChannel ( )
protected

_loadBaseChannel loads basic channel data

protected

Definition at line 89 of file oxrssfeed.php.

oxRssFeed::_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
Deprecated:
v5.3 (2016-05-04); Tags will be moved to own module.

protected

Definition at line 329 of file oxrssfeed.php.

oxRssFeed::_loadFromCache (   $name)
protected

_loadFromCache load data from cache, requires Rss data Id

Parameters
string$nameRss data Id

protected

Returns
array

Definition at line 139 of file oxrssfeed.php.

oxRssFeed::_prepareFeedName (   $sTitle)
protected

_prepareFeedName adds shop name to feed title

Parameters
string$sTitlepage title

protected

Returns
string

Definition at line 287 of file oxrssfeed.php.

oxRssFeed::_prepareUrl (   $sUri,
  $sTitle 
)
protected

_prepareUrl make url from uri

Parameters
string$sUristandard uri
string$sTitlepage title

protected

Returns
string

Definition at line 264 of file oxrssfeed.php.

oxRssFeed::_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

protected

Returns
void

Definition at line 187 of file oxrssfeed.php.

oxRssFeed::getBargainTitle ( )

getBargainTitle get title for 'Bargain' rss feed

public

Returns
string

Definition at line 887 of file oxrssfeed.php.

oxRssFeed::getBargainUrl ( )

getBargainUrl get url for 'Bargain' rss feed

public

Returns
string

Definition at line 902 of file oxrssfeed.php.

oxRssFeed::getCacheTtl ( )

Returns timestamp of defind cache time to live

Returns
integer

Definition at line 938 of file oxrssfeed.php.

oxRssFeed::getCategoryArticlesTitle ( oxCategory  $oCat)

get title for 'Category Articles' rss feed

Parameters
oxCategory$oCatcategory object

public

Returns
string

Definition at line 468 of file oxrssfeed.php.

oxRssFeed::getCategoryArticlesUrl ( oxCategory  $oCat)

getCategoryArticlesUrl get url for 'Category Articles' rss feed

Parameters
oxCategory$oCatcategory object

public

Returns
string

Definition at line 508 of file oxrssfeed.php.

oxRssFeed::getChannel ( )

getChannel retrieve channel data

public

Returns
array

Definition at line 66 of file oxrssfeed.php.

oxRssFeed::getNewestArticlesTitle ( )

get title for 'Newest Shop Articles' rss feed

public

Returns
string

Definition at line 413 of file oxrssfeed.php.

oxRssFeed::getNewestArticlesUrl ( )

getNewestArticlesUrl get url for 'Newest Shop Articles' rss feed

public

Returns
string

Definition at line 428 of file oxrssfeed.php.

oxRssFeed::getRecommListArticlesTitle ( oxRecommList  $oRecommList)

get title for 'Recommendation list articles' rss feed

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

Definition at line 823 of file oxrssfeed.php.

oxRssFeed::getRecommListArticlesUrl ( oxRecommList  $oRecommList)

get url for 'Recommendation lists' rss feed

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

Definition at line 840 of file oxrssfeed.php.

oxRssFeed::getRecommListsTitle ( oxArticle  $oArticle)

get title for 'Recommendation lists' rss feed

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

Definition at line 726 of file oxrssfeed.php.

oxRssFeed::getRecommListsUrl ( oxArticle  $oArticle)

get url for 'Recommendation lists' rss feed

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

Definition at line 743 of file oxrssfeed.php.

oxRssFeed::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

public

Returns
string

Definition at line 562 of file oxrssfeed.php.

oxRssFeed::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

public

Returns
string

Definition at line 670 of file oxrssfeed.php.

oxRssFeed::getTopInShopTitle ( )

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

public

Returns
string

Definition at line 359 of file oxrssfeed.php.

oxRssFeed::getTopInShopUrl ( )

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

public

Returns
string

Definition at line 374 of file oxrssfeed.php.

oxRssFeed::loadBargain ( )

loadBargain loads 'Bargain' rss data

public

Returns
void

Definition at line 914 of file oxrssfeed.php.

oxRssFeed::loadCategoryArticles ( oxCategory  $oCat)

loadCategoryArticles loads 'Category Articles' rss data

Parameters
oxCategory$oCatcategory object

public

Returns
void

Definition at line 527 of file oxrssfeed.php.

oxRssFeed::loadNewestArticles ( )

loadNewestArticles loads 'Newest Shop Articles' rss data

public

Returns
void

Definition at line 440 of file oxrssfeed.php.

oxRssFeed::loadRecommListArticles ( oxRecommList  $oRecommList)

loads 'Recommendation lists' rss data

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

Definition at line 860 of file oxrssfeed.php.

oxRssFeed::loadRecommLists ( oxArticle  $oArticle)

loads 'Recommendation lists' rss data

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

Definition at line 789 of file oxrssfeed.php.

oxRssFeed::loadSearchArticles (   $sSearch,
  $sCatId,
  $sVendorId,
  $sManufacturerId 
)

loadSearchArticles loads 'Search Articles' rss data

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

public

Definition at line 693 of file oxrssfeed.php.

oxRssFeed::loadTopInShop ( )

loadTopShop loads 'Top of the Shop' rss data

public

Returns
void

Definition at line 386 of file oxrssfeed.php.

oxRssFeed::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.

Definition at line 43 of file oxrssfeed.php.

oxRssFeed::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.

Definition at line 76 of file oxrssfeed.php.

Member Data Documentation

oxRssFeed::$_aChannel = array()
protected

Definition at line 34 of file oxrssfeed.php.

const oxRssFeed::CACHE_TTL = 10800

timeout in seconds for regenerating data (3h)

Definition at line 14 of file oxrssfeed.php.

const oxRssFeed::RSS_ARTRECOMMLISTS = 'RSS_ARTRECOMMLISTS'

Definition at line 23 of file oxrssfeed.php.

const oxRssFeed::RSS_BARGAIN = 'RSS_Bargain'

Definition at line 26 of file oxrssfeed.php.

const oxRssFeed::RSS_CATARTS = 'RSS_CatArts'

Definition at line 21 of file oxrssfeed.php.

const oxRssFeed::RSS_NEWARTS = 'RSS_NewArts'

Definition at line 20 of file oxrssfeed.php.

const oxRssFeed::RSS_RECOMMLISTARTS = 'RSS_RECOMMLISTARTS'

Definition at line 24 of file oxrssfeed.php.

const oxRssFeed::RSS_TOPSHOP = 'RSS_TopShop'

Rss data Ids for cache

Definition at line 19 of file oxrssfeed.php.


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