Skip navigation
Help

hook_aggregator_process

7 aggregator.api.php hook_aggregator_process($feed)

Implement this hook to create a processor for aggregator module.

A processor acts on parsed feed data. Active processors are called at the third and last of the 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 activated as processor on admin/config/services/aggregator.

Parameters

$feed: The $feed object that describes the resource to be processed. $feed->items contains an array of feed items downloaded and parsed at the parsing stage. See hook_aggregator_parse() for the basic format of a single item in the $feed->items array. For the exact format refer to the particular parser in use.

See also

hook_aggregator_process_info()

hook_aggregator_fetch()

hook_aggregator_parse()

Related topics

1 function implements hook_aggregator_process()

3 invocations of hook_aggregator_process()

File

drupal/modules/aggregator/aggregator.api.php, line 176
Documentation for aggregator API.

Code

function hook_aggregator_process($feed) {
  foreach ($feed->items as $item) {
    mymodule_save($item);
  }
}