public function FeedsHTTPFetcher::fetch in Feeds 7.2
Same name and namespace in other branches
- 6 plugins/FeedsHTTPFetcher.inc \FeedsHTTPFetcher::fetch()
- 7 plugins/FeedsHTTPFetcher.inc \FeedsHTTPFetcher::fetch()
Implements FeedsFetcher::fetch().
Overrides FeedsFetcher::fetch
File
- plugins/
FeedsHTTPFetcher.inc, line 126
Class
- FeedsHTTPFetcher
- Fetches data via HTTP.
Code
public function fetch(FeedsSource $source) {
$source_config = $source
->getConfigFor($this);
if ($this->config['use_pubsubhubbub'] && ($raw = $this
->subscriber($source->feed_nid)
->receive())) {
return new FeedsFetcherResult($raw);
}
$fetcher_result = new FeedsHTTPFetcherResult($source_config['source']);
// When request_timeout is empty, the global value is used.
$fetcher_result
->setTimeout($this->config['request_timeout']);
$fetcher_result
->setAcceptInvalidCert($this->config['accept_invalid_cert']);
$fetcher_result
->setCacheHttpResult($this->config['cache_http_result']);
return $fetcher_result;
}