You are here

public function FeedsOPMLParser::parse in Feeds 8.2

Same name and namespace in other branches
  1. 6 plugins/FeedsOPMLParser.inc \FeedsOPMLParser::parse()
  2. 7.2 plugins/FeedsOPMLParser.inc \FeedsOPMLParser::parse()
  3. 7 plugins/FeedsOPMLParser.inc \FeedsOPMLParser::parse()

Implements FeedsParser::parse().

File

lib/Drupal/feeds/Plugin/feeds/parser/FeedsOPMLParser.php, line 16
OPML Parser plugin.

Class

FeedsOPMLParser
Feeds parser plugin that parses OPML feeds.

Code

public function parse(FeedsSource $source, FeedsFetcherResult $fetcher_result) {
  feeds_include_library('opml_parser.inc', 'opml_parser');
  $opml = opml_parser_parse($fetcher_result
    ->getRaw());
  $result = new FeedsParserResult($opml['items']);
  $result->title = $opml['title'];
  return $result;
}