ItemsImporterInterface.php 840 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Drupal\aggregator;
  3. /**
  4. * Provides an interface defining an aggregator items importer.
  5. */
  6. interface ItemsImporterInterface {
  7. /**
  8. * Updates the feed items by triggering the import process.
  9. *
  10. * This process can be slow and lengthy because it relies on network
  11. * operations. Calling it on performance critical paths should be avoided.
  12. *
  13. * @param \Drupal\aggregator\FeedInterface $feed
  14. * The feed which items should be refreshed.
  15. *
  16. * @return bool
  17. * TRUE if there is new content for the feed FALSE otherwise.
  18. */
  19. public function refresh(FeedInterface $feed);
  20. /**
  21. * Deletes all imported items from a feed.
  22. *
  23. * @param \Drupal\aggregator\FeedInterface $feed
  24. * The feed that associated items should be deleted from.
  25. */
  26. public function delete(FeedInterface $feed);
  27. }