Mercurial > hg > isophonics-drupal-site
comparison core/modules/aggregator/src/Plugin/FetcherInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\aggregator\Plugin; | |
4 | |
5 use Drupal\aggregator\FeedInterface; | |
6 | |
7 /** | |
8 * Defines an interface for aggregator fetcher implementations. | |
9 * | |
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 | |
14 * or store the data. | |
15 * | |
16 * @see \Drupal\aggregator\Annotation\AggregatorFetcher | |
17 * @see \Drupal\aggregator\Plugin\AggregatorPluginSettingsBase | |
18 * @see \Drupal\aggregator\Plugin\AggregatorPluginManager | |
19 * @see plugin_api | |
20 */ | |
21 interface FetcherInterface { | |
22 | |
23 /** | |
24 * Downloads feed data. | |
25 * | |
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. | |
31 * | |
32 * @return bool | |
33 * TRUE if fetching was successful, FALSE otherwise. | |
34 */ | |
35 public function fetch(FeedInterface $feed); | |
36 | |
37 } |