ArrayResult.php 703 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Payment\Gateway\Command\Result;
  7. use Magento\Payment\Gateway\Command\ResultInterface;
  8. /**
  9. * Container for array that should be returned as command result.
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. class ArrayResult implements ResultInterface
  15. {
  16. /**
  17. * @var array
  18. */
  19. private $array;
  20. /**
  21. * @param array $array
  22. */
  23. public function __construct(array $array = [])
  24. {
  25. $this->array = $array;
  26. }
  27. /**
  28. * Returns result interpretation
  29. *
  30. * @return array
  31. */
  32. public function get()
  33. {
  34. return $this->array;
  35. }
  36. }