AtomParser

Extends FeedParser

ATOM Feed Parser class.

link
since

3.1.4

package

Joomla CMS

Methods

__construct

Constructor.

__construct(\XMLReader stream, \Joomla\CMS\Filter\InputFilter inputFilter = null) : 
inherited
since

3.1.4

Arguments

stream

XMLReaderThe XMLReader stream object for the feed.

inputFilter

InputFilterThe InputFilter object to be used

Response

mixed

bestLinkForUri

If there is more than one in the feed entry, find the most appropriate one and return it.

bestLinkForUri(mixed||string|int links) : \SimpleXMLElement

Arguments

links

array<string|int, mixed>Array of elements from the feed entry.

Response

SimpleXMLElement

fetchNamespace

Method to get a namespace object for a given namespace prefix.

fetchNamespace( prefix) : 
inherited
since

3.1.4

Arguments

prefix

stringThe XML prefix for which to fetch the namespace object.

Response

mixedNamespaceParserInterface or false if none exists.

handleAuthor

Method to handle the <author> element for the feed.

handleAuthor(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el) : 
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

handleContributor

Method to handle the <contributor> element for the feed.

handleContributor(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el) : 
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

handleGenerator

Method to handle the <generator> element for the feed.

handleGenerator(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el) : 
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

handleId

Method to handle the <id> element for the feed.

handleId(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el) : 
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

handleRights

Method to handle the <rights> element for the feed.

handleRights(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el) : 
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

handleSubtitle

Method to handle the <subtitle> element for the feed.

handleSubtitle(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el) : 
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

handleTitle

Method to handle the <title> element for the feed.

handleTitle(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el) : 
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

handleUpdated

Method to handle the <updated> element for the feed.

handleUpdated(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el) : 
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

initialise

Method to initialise the feed for parsing. Here we detect the version and advance the stream reader so that it is ready to parse feed elements.

initialise() : 
since

3.1.4

Response

void

moveToClosingElement

Method to move the stream parser to the closing XML node of the current element.

moveToClosingElement() : 
inherited
since

3.1.4

throws

RuntimeExceptionIf the closing tag cannot be found.

Response

void

moveToNextElement

Method to move the stream parser to the next XML element node.

moveToNextElement( name = null) : 
inherited
since

3.1.4

Arguments

name

stringThe name of the element for which to move the stream forward until is found.

Response

boolTrue if the stream parser is on an XML element node.

parse

Method to parse the feed into a JFeed object.

parse() : \Joomla\CMS\Feed\Feed
inherited
since

3.1.4

Response

Feed

processElement

Method to parse a specific feed element.

processElement(\Joomla\CMS\Feed\Feed feed, \SimpleXMLElement el, mixed||string|int namespaces) : 
inherited
since

3.1.4

Arguments

feed

FeedThe Feed object being built from the parsed feed.

el

SimpleXMLElementThe current XML element object to handle.

namespaces

array<string|int, mixed>The array of relevant namespace objects to process for the element.

Response

void

processFeedEntry

Method to handle a <entry> element for the feed.

processFeedEntry(\Joomla\CMS\Feed\FeedEntry entry, \SimpleXMLElement el) : 
since

3.1.4

Arguments

entry

FeedEntryThe FeedEntry object being built from the parsed feed entry.

el

SimpleXMLElementThe current XML element object to handle.

Response

void

registerNamespace

Method to register a namespace handler object.

registerNamespace( prefix, \Joomla\CMS\Feed\Parser\NamespaceParserInterface namespace) : \Joomla\CMS\Feed\FeedParser
inherited
since

3.1.4

Arguments

prefix

stringThe XML namespace prefix for which to register the namespace object.

namespace

NamespaceParserInterfaceThe namespace object to register.

Response

FeedParser

Properties

entryElementName

The feed element name for the entry elements.

inherited
since

3.1.4

Type(s)

string

namespaces

Array of NamespaceParserInterface objects

inherited
since

3.1.4

Type(s)

array<string|int, mixed>

stream

The XMLReader stream object for the feed.

inherited
since

3.1.4

Type(s)

XMLReader

inputFilter

The InputFilter

inherited
since

3.9.25

Type(s)

InputFilter

version

The feed format version.

since

3.1.4

Type(s)

string