Value.php 827 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Search\Response\Aggregation;
  7. use Magento\Framework\Api\Search\AggregationValueInterface;
  8. class Value implements AggregationValueInterface
  9. {
  10. /**
  11. * @var string|array
  12. */
  13. private $value;
  14. /**
  15. * @var array
  16. */
  17. private $metrics;
  18. /**
  19. * @param string|array $value
  20. * @param array $metrics
  21. */
  22. public function __construct($value, $metrics)
  23. {
  24. $this->value = $value;
  25. $this->metrics = $metrics;
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function getValue()
  31. {
  32. return $this->value;
  33. }
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function getMetrics()
  38. {
  39. return $this->metrics;
  40. }
  41. }