Abstract Class JFeedParser

Description

Feed Parser class.

  • abstract:
  • since: 12.3

Located in /libraries/joomla/feed/parser.php (line 19)


	
			
Direct descendents
Class Description
 class JFeedParserAtom ATOM Feed Parser class.
 class JFeedParserRss RSS Feed Parser class.
Variable Summary
 array $namespaces
 XMLReader $stream
Method Summary
 JFeedParser __construct (XMLReader $stream)
 mixed fetchNamespace (string $prefix)
 void initialise ()
 boolean moveToNextElement ([string $name = null])
 void processElement (JFeed $feed, SimpleXMLElement $el, array $namespaces)
 JFeed registerNamespace (string $prefix, JFeedParserNamespace $namespace)
Variables
string $entryElementName = 'entry' (line 27)

The feed element name for the entry elements.

  • since: 12.3
  • access: protected

Redefined in descendants as:
array $namespaces = array() (line 35)

Array of JFeedParserNamespace objects

  • since: 12.3
  • access: protected
XMLReader $stream (line 43)

The XMLReader stream object for the feed.

  • since: 12.3
  • access: protected
Methods
Constructor __construct (line 52)

Constructor.

  • since: 12.3
  • access: public
JFeedParser __construct (XMLReader $stream)
  • XMLReader $stream: The XMLReader stream object for the feed.
fetchNamespace (line 202)

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

  • return: JFeedParserNamespace or false if none exists.
  • since: 12.3
  • access: protected
mixed fetchNamespace (string $prefix)
  • string $prefix: The XML prefix for which to fetch the namespace object.
initialise (line 136)

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.

  • abstract:
  • since: 12.3
  • access: protected
void initialise ()

Redefined in descendants as:
  • JFeedParserAtom::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.
  • JFeedParserRss::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.
moveToClosingElement (line 259)

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

  • since: 12.3
  • throws: RuntimeException If the closing tag cannot be found.
  • access: protected
void moveToClosingElement ()
moveToNextElement (line 230)

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

  • return: True if the stream parser is on an XML element node.
  • since: 12.3
  • access: protected
boolean moveToNextElement ([string $name = null])
  • string $name: The name of the element for which to move the stream forward until is found.
parse (line 64)

Method to parse the feed into a JFeed object.

  • since: 12.3
  • access: public
JFeed parse ()
processElement (line 149)

Method to parse a specific feed element.

  • since: 12.3
  • access: protected
void processElement (JFeed $feed, SimpleXMLElement $el, array $namespaces)
  • JFeed $feed: The JFeed object being built from the parsed feed.
  • SimpleXMLElement $el: The current XML element object to handle.
  • array $namespaces: The array of relevant namespace objects to process for the element.
registerNamespace (line 121)

Method to register a namespace handler object.

  • since: 12.3
  • access: public
JFeed registerNamespace (string $prefix, JFeedParserNamespace $namespace)
  • string $prefix: The XML namespace prefix for which to register the namespace object.
  • JFeedParserNamespace $namespace: The namespace object to register.

Documentation generated on Tue, 19 Nov 2013 15:10:17 +0100 by phpDocumentor 1.4.3