- md5
- e1b2c607a2b4d0d8ae255957e9454099
- sha1
- 90fc3d49c388cb0a45e12f758b9e63c38f713ab4
- sha256
- 00b2b7b763ac3a7ecfe475f3703a1a49553828c63ae6469e4e6d9d5bfff3b41b
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
<?php
/**
* @package Joomla.Legacy
* @subpackage Simplepie
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
jimport('simplepie.simplepie');
/**
* Class to maintain a pathway.
*
* The user's navigated path within the application.
*
* @package Joomla.Legacy
* @subpackage Simplepie
* @since 12.2
* @deprecated 12.3 (Platform) & 4.0 (CMS) - Use JFeed or supply your own methods
*/
class JSimplepieFactory
{
/**
* Get a parsed XML Feed Source
*
* @param string $url Url for feed source.
* @param integer $cache_time Time to cache feed for (using internal cache mechanism).
*
* @return mixed SimplePie parsed object on success, false on failure.
*
* @since 12.2
* @deprecated 4.0 Use JFeedFactory($url) instead.
*
* @note In 3.2 will be proxied to JFeedFactory()
*/
public static function getFeedParser($url, $cache_time = 0)
{
JLog::add(__METHOD__ . ' is deprecated. Use JFeedFactory() or supply Simple Pie instead.', JLog::WARNING, 'deprecated');
$cache = JFactory::getCache('feed_parser', 'callback');
if ($cache_time > 0)
{
$cache->setLifeTime($cache_time);
}
$simplepie = new SimplePie(null, null, 0);
$simplepie->enable_cache(false);
$simplepie->set_feed_url($url);
$simplepie->force_feed(true);
$contents = $cache->get(array($simplepie, 'init'), null, false, false);
if ($contents)
{
return $simplepie;
}
JLog::add(JText::_('JLIB_UTIL_ERROR_LOADING_FEED_DATA'), JLog::WARNING, 'jerror');
return false;
}
}
The same content is in 5 releases, Joomla 3.1.4 to 3.2.1. See them all, or every version of this file.