QueryContainer.php 624 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Elasticsearch\SearchAdapter;
  7. /**
  8. * The purpose of this class to be a container for the array with ElasticSearch query.
  9. * @codeCoverageIgnore
  10. */
  11. class QueryContainer
  12. {
  13. /**
  14. * @var array
  15. */
  16. private $query;
  17. /**
  18. * @param array $query
  19. */
  20. public function __construct(array $query)
  21. {
  22. $this->query = $query;
  23. }
  24. /**
  25. * Returns a query
  26. *
  27. * @return array
  28. */
  29. public function getQuery()
  30. {
  31. return $this->query;
  32. }
  33. }