interface FetcherInterface

Defines an interface for aggregator fetcher implementations.

A fetcher downloads feed data to a Drupal site. The fetcher is called at the first of the three aggregation stages: first, data is downloaded by the active fetcher; second, it is converted to a common format by the active parser; and finally, it is passed to all active processors, which manipulate or store the data.

Hierarchy

Expanded class hierarchy of FetcherInterface

All classes that implement FetcherInterface

2 files declare their use of FetcherInterface
DefaultFetcher.php in drupal/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/fetcher/DefaultFetcher.php
Contains \Drupal\aggregator\Plugin\aggregator\fetcher\DefaultFetcher.
TestFetcher.php in drupal/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/fetcher/TestFetcher.php
Contains \Drupal\aggregator_test\Plugin\aggregator\fetcher\TestFetcher.

File

drupal/core/modules/aggregator/lib/Drupal/aggregator/Plugin/FetcherInterface.php, line 21
Contains \Drupal\aggregator\Plugin\FetcherInterface.

Namespace

Drupal\aggregator\Plugin
View source
interface FetcherInterface {

  /**
   * Downloads feed data.
   *
   * @param \Drupal\aggregator\Plugin\Core\Entity\Feed $feed
   *   A feed object representing the resource to be downloaded.
   *   $feed->url->value contains the link to the feed.
   *   Download the data at the URL and expose it
   *   to other modules by attaching it to $feed->source_string.
   *
   * @return
   *   TRUE if fetching was successful, FALSE otherwise.
   */
  public function fetch(Feed $feed);

}

Members

Namesort descending Modifiers Type Description Overrides
FetcherInterface::fetch public function Downloads feed data. 1