class ItemsImporter implements ItemsImporterInterface (View source)

Defines an importer of aggregator items.

Properties

protected AggregatorPluginManager $fetcherManager

The aggregator fetcher manager.

protected AggregatorPluginManager $processorManager

The aggregator processor manager.

protected AggregatorPluginManager $parserManager

The aggregator parser manager.

protected Config $config

The aggregator.settings config object.

protected LoggerInterface $logger

A logger instance.

Methods

__construct(ConfigFactoryInterface $config_factory, AggregatorPluginManager $fetcher_manager, AggregatorPluginManager $parser_manager, AggregatorPluginManager $processor_manager, LoggerInterface $logger)

Constructs an Importer object.

delete(FeedInterface $feed)

Deletes all imported items from a feed.

bool
refresh(FeedInterface $feed)

Updates the feed items by triggering the import process.

Details

__construct(ConfigFactoryInterface $config_factory, AggregatorPluginManager $fetcher_manager, AggregatorPluginManager $parser_manager, AggregatorPluginManager $processor_manager, LoggerInterface $logger)

Constructs an Importer object.

Parameters

ConfigFactoryInterface $config_factory

The factory for configuration objects.

AggregatorPluginManager $fetcher_manager

The aggregator fetcher plugin manager.

AggregatorPluginManager $parser_manager

The aggregator parser plugin manager.

AggregatorPluginManager $processor_manager

The aggregator processor plugin manager.

LoggerInterface $logger

A logger instance.

delete(FeedInterface $feed)

Deletes all imported items from a feed.

Parameters

FeedInterface $feed

The feed that associated items should be deleted from.

bool refresh(FeedInterface $feed)

Updates the feed items by triggering the import process.

This process can be slow and lengthy because it relies on network operations. Calling it on performance critical paths should be avoided.

Parameters

FeedInterface $feed

The feed which items should be refreshed.

Return Value

bool

TRUE if there is new content for the feed FALSE otherwise.