FeedParser
Feed Parser class.
since |
3.1.4 |
---|---|
package |
Joomla CMS |
Methods
__construct
Constructor.
__construct(\XMLReader stream, \Joomla\CMS\Filter\InputFilter inputFilter = null) :
since |
3.1.4 |
---|
Arguments
- stream
XMLReader
The XMLReader stream object for the feed.- inputFilter
InputFilter
The InputFilter object to be used
Response
mixed
fetchNamespace
Method to get a namespace object for a given namespace prefix.
fetchNamespace( prefix) :
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.
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() :
since |
3.1.4 |
---|
Response
void
moveToClosingElement
Method to move the stream parser to the closing XML node of the current element.
moveToClosingElement() :
since |
3.1.4 |
---|---|
throws |
|
Response
void
moveToNextElement
Method to move the stream parser to the next XML element node.
moveToNextElement( name = null) :
since |
3.1.4 |
---|
Arguments
- name
string
The name of the element for which to move the stream forward until is found.
Response
bool
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, mixed||string|int namespaces) :
since |
3.1.4 |
---|
Arguments
- feed
Feed
The Feed object being built from the parsed feed.- el
SimpleXMLElement
The current XML element object to handle.- namespaces
array<string|int, mixed>
The array of relevant namespace objects to process for the element.
Response
void
registerNamespace
Method to register a namespace handler object.
registerNamespace( prefix, \Joomla\CMS\Feed\Parser\NamespaceParserInterface namespace) : \Joomla\CMS\Feed\FeedParser
since |
3.1.4 |
---|
Arguments
- prefix
string
The XML namespace prefix for which to register the namespace object.- namespace
NamespaceParserInterface
The namespace object to register.
Response
Properties
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<string|int, mixed>
stream
The XMLReader stream object for the feed.
since |
3.1.4 |
---|
Type(s)
XMLReader