You are here

public function FeedsHTTPFetcher::fetch in Feeds 6

Same name and namespace in other branches
  1. 7.2 plugins/FeedsHTTPFetcher.inc \FeedsHTTPFetcher::fetch()
  2. 7 plugins/FeedsHTTPFetcher.inc \FeedsHTTPFetcher::fetch()

Implements FeedsFetcher::fetch().

Overrides FeedsFetcher::fetch

File

plugins/FeedsHTTPFetcher.inc, line 47

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 FeedsImportBatch($raw, $source->feed_nid);
  }
  return new FeedsHTTPBatch($source_config['source'], $source->feed_nid);
}