AtomParser
Extends \Joomla\CMS\Feed\FeedParserATOM Feed Parser class.
link | |
---|---|
since |
3.1.4 |
Methods
__construct
Constructor.
__construct(\XMLReader $stream)
since |
3.1.4 |
---|
Arguments
- $stream
\XMLReader
The XMLReader stream object for the feed.
bestLinkForUri
If there is more than one in the feed entry, find the most appropriate one and return it.
bestLinkForUri(array $links) : \SimpleXMLElement
Arguments
- $links
array
Array of elements from the feed entry.
Response
\SimpleXMLElement
fetchNamespace
Method to get a namespace object for a given namespace prefix.
fetchNamespace(string $prefix) : mixed
since |
3.1.4 |
---|
Arguments
- $prefix
string
The XML prefix for which to fetch the namespace object.
Response
mixed
NamespaceParserInterface or false if none exists.
handleAuthor
Method to handle the <author>
element for the feed.
handleAuthor(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
handleContributor
Method to handle the <contributor>
element for the feed.
handleContributor(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
handleGenerator
Method to handle the <generator>
element for the feed.
handleGenerator(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
handleId
Method to handle the <id>
element for the feed.
handleId(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
handleLink
Method to handle the <link>
element for the feed.
handleLink(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
handleRights
Method to handle the <rights>
element for the feed.
handleRights(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
handleSubtitle
Method to handle the <subtitle>
element for the feed.
handleSubtitle(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
handleTitle
Method to handle the <title>
element for the feed.
handleTitle(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
handleUpdated
Method to handle the <updated>
element for the feed.
handleUpdated(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.
initialise
Method to initialise the feed for parsing. If child parsers need to detect versions or other such things this is where you'll want to implement that logic.
initialise() : void
since |
3.1.4 |
---|
moveToClosingElement
Method to move the stream parser to the closing XML node of the current element.
moveToClosingElement() : void
since |
3.1.4 |
---|---|
throws |
|
moveToNextElement
Method to move the stream parser to the next XML element node.
moveToNextElement(string $name = null) : boolean
since |
3.1.4 |
---|
Arguments
- $name
string
The name of the element for which to move the stream forward until is found.
Response
boolean
True 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
processElement
Method to parse a specific feed element.
processElement(\Joomla\CMS\Feed\Feed $feed, \SimpleXMLElement $el, array $namespaces) : void
since |
3.1.4 |
---|
Arguments
- $feed
\Joomla\CMS\Feed\Feed
The Feed object being built from the parsed feed.- $el
\SimpleXMLElement
The current XML element object to handle.- $namespaces
array
The array of relevant namespace objects to process for the element.
processFeedEntry
Method to handle a <entry>
element for the feed.
processFeedEntry(\Joomla\CMS\Feed\FeedEntry $entry, \SimpleXMLElement $el) : void
since |
3.1.4 |
---|
Arguments
- $entry
\Joomla\CMS\Feed\FeedEntry
The FeedEntry object being built from the parsed feed entry.- $el
\SimpleXMLElement
The current XML element object to handle.
registerNamespace
Method to register a namespace handler object.
registerNamespace(string $prefix, \Joomla\CMS\Feed\Parser\NamespaceParserInterface $namespace) : \Joomla\CMS\Feed\JFeed
since |
3.1.4 |
---|
Arguments
- $prefix
string
The XML namespace prefix for which to register the namespace object.- $namespace
\Joomla\CMS\Feed\Parser\NamespaceParserInterface
The namespace object to register.
Response
\Joomla\CMS\Feed\JFeed
Properties
version
The feed format version.
since |
3.1.4 |
---|
Type(s)
string
entryElementName
The feed element name for the entry elements.
since |
3.1.4 |
---|
Type(s)
string
namespaces
Array of NamespaceParserInterface objects
since |
3.1.4 |
---|
Type(s)
array
stream
The XMLReader stream object for the feed.
since |
3.1.4 |
---|
Type(s)
\XMLReader