Back to AtomParser class

Method initialise

protected 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.
Returns
  • void
Since
  • 3.1.4
Class: AtomParser
Project: Joomla

Method initialise - Source code

/**
 * 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.
 *
 * @return  void
 *
 * @since   3.1.4
 */
protected function initialise()
{
    // Read the version attribute.
    $this->version = $this->stream->getAttribute('version') == '0.3' ? '0.3' : '1.0';
    // We want to move forward to the first element after the root element.
    $this->moveToNextElement();
}