FeedFactory

Feed factory class.

since

3.1.4

package

Joomla CMS

Methods

_fetchFeedParser

Method to return a new JFeedParser object based on the registered parsers and a given type.

_fetchFeedParser( type, \XMLReader reader) : \Joomla\CMS\Feed\FeedParser
since

3.1.4

throws

LogicException

Arguments

type

stringThe name of parser to return.

reader

XMLReaderThe XMLReader instance for the feed.

Response

FeedParser

getFeed

Method to load a URI into the feed reader for parsing.

getFeed( uri) : \Joomla\CMS\Feed\Feed
since

3.1.4

throws

InvalidArgumentException

RuntimeException

Arguments

uri

stringThe URI of the feed to load. Idn uris must be passed already converted to punycode.

Response

Feed

getParsers

Method to get the registered Parsers

getParsers() : mixed||string|int
since

4.0.0

Response

array<string|int, mixed>

registerParser

Method to register a FeedParser class for a given root tag name.

registerParser( tagName,  className,  overwrite = false) : \Joomla\CMS\Feed\FeedFactory
since

3.1.4

throws

InvalidArgumentException

Arguments

tagName

stringThe root tag name for which to register the parser class.

className

stringThe FeedParser class name to register for a root tag name.

overwrite

boolTrue to overwrite the parser class if one is already registered.

Response

FeedFactory

Properties

parsers

The list of registered parser classes for feeds.

since

3.1.4

Type(s)

array<string|int, mixed>