You are here

public function FeedsAtomRDFParser::parse in Feeds Atom 6

Same name and namespace in other branches
  1. 7 plugins/FeedsAtomRDFParser.inc \FeedsAtomRDFParser::parse()

Implementation of FeedsParser::parse().

Overrides FeedsParser::parse

File

plugins/FeedsAtomRDFParser.inc, line 17
Contains the feeds atom RDF parser class.

Class

FeedsAtomRDFParser
Parses Atom RDF feeds.

Code

public function parse(FeedsImportBatch $batch, FeedsSource $source) {
  require_once './' . drupal_get_path('module', 'feeds_atom') . '/libraries/atomrdf_parser.inc';
  $result = atomrdf_parser_parse($batch
    ->getRaw());
  $batch
    ->setTitle($result['title']);
  $batch
    ->setDescription($result['description']);
  $batch
    ->setLink($result['link']);
  if (is_array($result['items'])) {
    $batch
      ->setItems($result['items']);
  }
}