You are here

public function FetcherInterface::fetch in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/aggregator/src/Plugin/FetcherInterface.php \Drupal\aggregator\Plugin\FetcherInterface::fetch()

Downloads feed data.

Parameters

\Drupal\aggregator\FeedInterface $feed: A feed object representing the resource to be downloaded. $feed->getUrl() 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 value

bool TRUE if fetching was successful, FALSE otherwise.

1 method overrides FetcherInterface::fetch()
DefaultFetcher::fetch in core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php
Downloads feed data.

File

core/modules/aggregator/src/Plugin/FetcherInterface.php, line 35

Class

FetcherInterface
Defines an interface for aggregator fetcher implementations.

Namespace

Drupal\aggregator\Plugin

Code

public function fetch(FeedInterface $feed);