You are here

public function FeedsOPMLParser::parse in Feeds 6

Same name and namespace in other branches
  1. 8.2 lib/Drupal/feeds/Plugin/feeds/parser/FeedsOPMLParser.php \FeedsOPMLParser::parse()
  2. 7.2 plugins/FeedsOPMLParser.inc \FeedsOPMLParser::parse()
  3. 7 plugins/FeedsOPMLParser.inc \FeedsOPMLParser::parse()

Implementation of FeedsParser::parse().

Overrides FeedsParser::parse

File

plugins/FeedsOPMLParser.inc, line 16
OPML Parser plugin.

Class

FeedsOPMLParser
Feeds parser plugin that parses OPML feeds.

Code

public function parse(FeedsImportBatch $batch, FeedsSource $source) {
  feeds_include_library('opml_parser.inc', 'opml_parser');
  $result = opml_parser_parse($batch
    ->getRaw());
  $batch->title = $result['title'];
  $batch->items = $result['items'];
}