function _parser_ical_feedapi_parse in iCal feed parser 6
Same name and namespace in other branches
- 5 parser_ical.module \_parser_ical_feedapi_parse()
Parse the feed into a data structure
Parameters
$url: The feed's url
$cache: If the results can be cached or not
Return value
stdClass The structured datas extracted from the feed
1 call to _parser_ical_feedapi_parse()
- parser_ical_feedapi_feed in ./
parser_ical.module - Implementation of hook_feedapi_feed().
File
- ./
parser_ical.feedapi.inc, line 18 - parser_ical include for actually parsing feed.
Code
function _parser_ical_feedapi_parse($feed, $cache = FALSE) {
$url = $feed->url;
// Substitute webcal with http.
if (stripos($url, 'webcal') === 0) {
$url = 'http' . substr($url, 6);
}
$downloaded_string = _parser_ical_download($url);
if ($downloaded_string === FALSE || empty($downloaded_string)) {
return $downloaded_string;
}
return _parser_ical_parse($downloaded_string);
}