interface ProcessorInterface

Same name and namespace in other branches
  1. 8.9.x core/modules/aggregator/src/Plugin/ProcessorInterface.php \Drupal\aggregator\Plugin\ProcessorInterface

Defines an interface for aggregator processor implementations.

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.

Hierarchy

Expanded class hierarchy of ProcessorInterface

All classes that implement ProcessorInterface

See also

\Drupal\aggregator\Annotation\AggregatorProcessor

\Drupal\aggregator\Plugin\AggregatorPluginSettingsBase

\Drupal\aggregator\Plugin\AggregatorPluginManager

Plugin API

2 files declare their use of ProcessorInterface
DefaultProcessor.php in core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
TestProcessor.php in core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/processor/TestProcessor.php

File

core/modules/aggregator/src/Plugin/ProcessorInterface.php, line 21

Namespace

Drupal\aggregator\Plugin
View source
interface ProcessorInterface {
    
    /**
     * Processes feed data.
     *
     * @param \Drupal\aggregator\FeedInterface $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 \Drupal\aggregator\Plugin\FetcherInterface::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.
     */
    public function process(FeedInterface $feed);
    
    /**
     * Refreshes feed information.
     *
     * Called after the processing of the feed is completed by all selected
     * processors.
     *
     * @param \Drupal\aggregator\FeedInterface $feed
     *   Object describing feed.
     *
     * @see aggregator_refresh()
     */
    public function postProcess(FeedInterface $feed);
    
    /**
     * Deletes stored feed data.
     *
     * Called by aggregator if either a feed is deleted or a user clicks on
     * "delete items".
     *
     * @param \Drupal\aggregator\FeedInterface $feed
     *   The $feed object whose items are being deleted.
     */
    public function delete(FeedInterface $feed);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ProcessorInterface::delete public function Deletes stored feed data. 2
ProcessorInterface::postProcess public function Refreshes feed information. 2
ProcessorInterface::process public function Processes feed data. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.