SearchResultInterface.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Api\Search;
  7. use Magento\Framework\Api\SearchResultsInterface;
  8. /**
  9. * Interface SearchResultInterface
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. interface SearchResultInterface extends SearchResultsInterface
  15. {
  16. /**#@+
  17. * Constants defined for keys of data array
  18. */
  19. const TOTAL_COUNT = 'total_count';
  20. const SEARCH_CRITERIA = 'search_criteria';
  21. const ITEMS = 'items';
  22. const AGGREGATIONS = 'aggregations';
  23. /**#@-*/
  24. /**
  25. * @return \Magento\Framework\Api\Search\DocumentInterface[]
  26. */
  27. public function getItems();
  28. /**
  29. * Set items list.
  30. *
  31. * @param \Magento\Framework\Api\Search\DocumentInterface[] $items
  32. * @return $this
  33. */
  34. public function setItems(array $items = null);
  35. /**
  36. * @return \Magento\Framework\Api\Search\AggregationInterface
  37. */
  38. public function getAggregations();
  39. /**
  40. * @param \Magento\Framework\Api\Search\AggregationInterface $aggregations
  41. * @return $this
  42. */
  43. public function setAggregations($aggregations);
  44. /**
  45. * Get search criteria.
  46. *
  47. * @return \Magento\Framework\Api\Search\SearchCriteriaInterface
  48. */
  49. public function getSearchCriteria();
  50. }