You are here

public function ParserIcalFeedsParser::parse in iCal feed parser 7

Same name and namespace in other branches
  1. 6.2 includes/ParserIcalFeedsParser.inc \ParserIcalFeedsParser::parse()

Parse content fetched by fetcher.

File

includes/ParserIcalFeedsParser.inc, line 118

Class

ParserIcalFeedsParser
Class definition for iCal date module Parser.

Code

public function parse(FeedsSource $source, FeedsFetcherResult $fetcher_result) {
  module_load_include('inc', 'parser_ical', 'parser_ical.dateapi');
  $parsed_output = _parser_ical_parse($fetcher_result
    ->getRaw());

  // Construct the standard form of the parsed feed
  $result = new FeedsParserResult();
  $result->title = $parsed_output['title'];
  $result->description = $parsed_output['description'];
  $result->items = $parsed_output['items'];

  // also available calscale, timezone
  return $result;
}