hook_aggregator_process
function hook_aggregator_process
hook_aggregator_process($feed)
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: 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 that manipulate or store the data.
Modules that define this hook can be activated as a processor within the configuration page.
Parameters
$feed: A feed object representing 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()
Related topics
File
- modules/aggregator/aggregator.api.php, line 168
- Documentation for aggregator API.
Code
function hook_aggregator_process($feed) { foreach ($feed->items as $item) { mymodule_save($item); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!aggregator!aggregator.api.php/function/hook_aggregator_process/7.x