Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / aggregator / src / ItemStorageInterface.php
1 <?php
2
3 namespace Drupal\aggregator;
4
5 use Drupal\Core\Entity\ContentEntityStorageInterface;
6
7 /**
8  * Defines an interface for aggregator item entity storage classes.
9  */
10 interface ItemStorageInterface extends ContentEntityStorageInterface {
11
12   /**
13    * Returns the count of the items in a feed.
14    *
15    * @param \Drupal\aggregator\FeedInterface $feed
16    *   The feed entity.
17    *
18    * @return int
19    *   The count of items associated with a feed.
20    */
21   public function getItemCount(FeedInterface $feed);
22
23   /**
24    * Loads feed items from all feeds.
25    *
26    * @param int $limit
27    *   (optional) The number of items to return. Defaults to unlimited.
28    *
29    * @return \Drupal\aggregator\ItemInterface[]
30    *   An array of the feed items.
31    */
32   public function loadAll($limit = NULL);
33
34   /**
35    * Loads feed items filtered by a feed.
36    *
37    * @param int $fid
38    *   The feed ID to filter by.
39    * @param int $limit
40    *   (optional) The number of items to return. Defaults to unlimited.
41    *
42    * @return \Drupal\aggregator\ItemInterface[]
43    *   An array of the feed items.
44    */
45   public function loadByFeed($fid, $limit = NULL);
46
47 }