hook_aggregator_fetch

  1. drupal
    1. drupal7
Versionen
drupal7 hook_aggregator_fetch($feed)

Implement this hook to create an alternative fetcher for aggregator module.

A fetcher downloads feed data to a Drupal site. The fetcher is called at the first of the three aggregation stages: data is downloaded by the active fetcher, 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.

Modules that define this hook can be set as active fetcher on admin/settings/aggregator. Only one fetcher can be active at a time.

Übergabeparameter

$feed The $feed object that describes the resource to be downloaded. $feed->url 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.

See also

hook_aggregator_fetch_info()

hook_aggregator_parse()

hook_aggregator_process()

Verwandte Themen

Code

modules/aggregator/aggregator.api.php, line 37

<?php
function hook_aggregator_fetch($feed) {
  $feed->source_string = mymodule_fetch($feed->url);
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen