ShipmentProvider.php 678 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Shipping\Model;
  8. use Magento\Framework\App\RequestInterface;
  9. /**
  10. * @inheritdoc
  11. */
  12. class ShipmentProvider implements ShipmentProviderInterface
  13. {
  14. /**
  15. * @var RequestInterface
  16. */
  17. private $request;
  18. /**
  19. * @param RequestInterface $request
  20. */
  21. public function __construct(RequestInterface $request)
  22. {
  23. $this->request = $request;
  24. }
  25. /**
  26. * @inheritdoc
  27. */
  28. public function getShipmentData(): array
  29. {
  30. return $this->request->getParam('shipment', []);
  31. }
  32. }