3 namespace Drupal\aggregator\Plugin;
5 use Drupal\aggregator\FeedInterface;
8 * Defines an interface for aggregator fetcher implementations.
10 * A fetcher downloads feed data to a Drupal site. The fetcher is called at the
11 * first of the three aggregation stages: first, data is downloaded by the
12 * active fetcher; second, it is converted to a common format by the active
13 * parser; and finally, it is passed to all active processors, which manipulate
16 * @see \Drupal\aggregator\Annotation\AggregatorFetcher
17 * @see \Drupal\aggregator\Plugin\AggregatorPluginSettingsBase
18 * @see \Drupal\aggregator\Plugin\AggregatorPluginManager
21 interface FetcherInterface {
24 * Downloads feed data.
26 * @param \Drupal\aggregator\FeedInterface $feed
27 * A feed object representing the resource to be downloaded.
28 * $feed->getUrl() contains the link to the feed.
29 * Download the data at the URL and expose it
30 * to other modules by attaching it to $feed->source_string.
33 * TRUE if fetching was successful, FALSE otherwise.
35 public function fetch(FeedInterface $feed);