Skip to content

Commit

Permalink
feed
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Lodder committed Mar 12, 2019
1 parent 58758be commit d406d1f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion administrator/modules/mod_feed/Helper/FeedHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\Feed\Feed;
use Joomla\CMS\Feed\FeedFactory;
use Joomla\CMS\Language\Text;

Expand All @@ -26,7 +27,7 @@ class FeedHelper
*
* @param JRegisty $params The parameters object.
*
* @return JFeedReader|string Return a JFeedReader object or a string message if error.
* @return FeedReader|string Return a FeedReader object or a string message if error.
*
* @since 1.5
*/
Expand Down
6 changes: 3 additions & 3 deletions build/build-modules-js/namespace.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const RootPath = require('./utils/rootpath.es6.js')._();


const jregex = /defined\('(JPATH_BASE|_JEXEC|JPATH_PLATFORM)'\) or die;/gm;
const oldClassName = 'JFeedEntry';
const classUse = 'use Joomla\\CMS\\Feed\\FeedEntry;';
const oldClassName = 'JFeed';
const classUse = 'use Joomla\\CMS\\Feed\\Feed;';
const newClassName = classUse.substr(classUse.lastIndexOf('\\') + 1).slice(0, -1);
const root = `${RootPath}/`;
const filesToIgnore = [
Expand Down Expand Up @@ -60,7 +60,7 @@ const readFile = (path) => {
};

const getInstances = (content, path) => {
const regex = /(?=\S)(?!\/\*\*)(?!\/\/)(?!\*)(\\?JFeedEntry)/gm;
const regex = /(?=\S)(?!\/\*\*)(?!\/\/)(?!\*)(\\?JFeed)/gm;
const matches = content.match(regex);

if (matches !== null) {
Expand Down
5 changes: 4 additions & 1 deletion libraries/src/Feed/FeedEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Date\Date;
use Joomla\CMS\Feed\Feed;
use Joomla\CMS\Feed\FeedPerson;



/**
* Class to encapsulate a feed entry for the Joomla Platform.
*
Expand Down Expand Up @@ -90,7 +93,7 @@ public function __set($name, $value)
);
}

// Validate that any sources that are set are instances of JFeed or null.
// Validate that any sources that are set are instances of Feed or null.
if (($name == 'source') && (!($value instanceof Feed) || ($value === null)))
{
throw new \InvalidArgumentException(
Expand Down
5 changes: 3 additions & 2 deletions libraries/src/Feed/FeedParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Feed\Feed;
use Joomla\CMS\Feed\Parser\NamespaceParserInterface;

/**
Expand Down Expand Up @@ -56,7 +57,7 @@ public function __construct(\XMLReader $stream)
}

/**
* Method to parse the feed into a JFeed object.
* Method to parse the feed into a Feed object.
*
* @return Feed
*
Expand Down Expand Up @@ -116,7 +117,7 @@ public function parse()
* @param string $prefix The XML namespace prefix for which to register the namespace object.
* @param NamespaceParserInterface $namespace The namespace object to register.
*
* @return JFeed
* @return Feed
*
* @since 3.1.4
*/
Expand Down
3 changes: 2 additions & 1 deletion libraries/src/MVC/View/CategoryFeedView.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Feed\Feed;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

Expand Down Expand Up @@ -112,7 +113,7 @@ public function display($tpl = null)
}

// Load individual item creator class.
$feeditem = new \JFeedItem;
$feeditem = new FeedItem;
$feeditem->title = $title;
$feeditem->link = $link;
$feeditem->description = $description;
Expand Down
3 changes: 2 additions & 1 deletion modules/mod_feed/Helper/FeedHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\Feed\Feed;
use Joomla\CMS\Feed\FeedFactory;
use Joomla\CMS\Language\Text;

Expand All @@ -26,7 +27,7 @@ class FeedHelper
*
* @param \Joomla\Registry\Registry $params module parameters
*
* @return JFeedReader|string
* @return FeedReader|string
*/
public static function getFeed($params)
{
Expand Down

0 comments on commit d406d1f

Please sign in to comment.