annotate core/modules/aggregator/src/Plugin/FetcherInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\aggregator\Plugin;
Chris@0 4
Chris@0 5 use Drupal\aggregator\FeedInterface;
Chris@0 6
Chris@0 7 /**
Chris@0 8 * Defines an interface for aggregator fetcher implementations.
Chris@0 9 *
Chris@0 10 * A fetcher downloads feed data to a Drupal site. The fetcher is called at the
Chris@0 11 * first of the three aggregation stages: first, data is downloaded by the
Chris@0 12 * active fetcher; second, it is converted to a common format by the active
Chris@0 13 * parser; and finally, it is passed to all active processors, which manipulate
Chris@0 14 * or store the data.
Chris@0 15 *
Chris@0 16 * @see \Drupal\aggregator\Annotation\AggregatorFetcher
Chris@0 17 * @see \Drupal\aggregator\Plugin\AggregatorPluginSettingsBase
Chris@0 18 * @see \Drupal\aggregator\Plugin\AggregatorPluginManager
Chris@0 19 * @see plugin_api
Chris@0 20 */
Chris@0 21 interface FetcherInterface {
Chris@0 22
Chris@0 23 /**
Chris@0 24 * Downloads feed data.
Chris@0 25 *
Chris@0 26 * @param \Drupal\aggregator\FeedInterface $feed
Chris@0 27 * A feed object representing the resource to be downloaded.
Chris@0 28 * $feed->getUrl() contains the link to the feed.
Chris@0 29 * Download the data at the URL and expose it
Chris@0 30 * to other modules by attaching it to $feed->source_string.
Chris@0 31 *
Chris@0 32 * @return bool
Chris@0 33 * TRUE if fetching was successful, FALSE otherwise.
Chris@0 34 */
Chris@0 35 public function fetch(FeedInterface $feed);
Chris@0 36
Chris@0 37 }