public function FeedsOPMLParser::parse in Feeds 7.2
Same name and namespace in other branches
- 8.2 lib/Drupal/feeds/Plugin/feeds/parser/FeedsOPMLParser.php \FeedsOPMLParser::parse()
- 6 plugins/FeedsOPMLParser.inc \FeedsOPMLParser::parse()
- 7 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(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;
}