Mercurial > hg > isophonics-drupal-site
diff core/modules/aggregator/src/ItemStorageInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/aggregator/src/ItemStorageInterface.php Wed Nov 29 16:09:58 2017 +0000 @@ -0,0 +1,47 @@ +<?php + +namespace Drupal\aggregator; + +use Drupal\Core\Entity\ContentEntityStorageInterface; + +/** + * Defines an interface for aggregator item entity storage classes. + */ +interface ItemStorageInterface extends ContentEntityStorageInterface { + + /** + * Returns the count of the items in a feed. + * + * @param \Drupal\aggregator\FeedInterface $feed + * The feed entity. + * + * @return int + * The count of items associated with a feed. + */ + public function getItemCount(FeedInterface $feed); + + /** + * Loads feed items from all feeds. + * + * @param int $limit + * (optional) The number of items to return. Defaults to unlimited. + * + * @return \Drupal\aggregator\ItemInterface[] + * An array of the feed items. + */ + public function loadAll($limit = NULL); + + /** + * Loads feed items filtered by a feed. + * + * @param int $fid + * The feed ID to filter by. + * @param int $limit + * (optional) The number of items to return. Defaults to unlimited. + * + * @return \Drupal\aggregator\ItemInterface[] + * An array of the feed items. + */ + public function loadByFeed($fid, $limit = NULL); + +}