You are here

public function FeedsOPMLParser::parse in Feeds 7

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

Implements 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
    ->setTitle($result['title']);
  $batch
    ->setItems($result['items']);
}