OverrideService.php 783 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\TestModule5\Service\V1;
  7. use Magento\TestModule5\Service\V1\Entity\AllSoapAndRestFactory;
  8. class OverrideService implements OverrideServiceInterface
  9. {
  10. /**
  11. * @var AllSoapAndRestFactory
  12. */
  13. protected $factory;
  14. /**
  15. * @param AllSoapAndRestFactory $factory
  16. */
  17. public function __construct(AllSoapAndRestFactory $factory)
  18. {
  19. $this->factory = $factory;
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function scalarUpdate($entityId, $name, $hasOrders)
  25. {
  26. return $this->factory->create()
  27. ->setEntityId($entityId)
  28. ->setName($name)
  29. ->setHasOrders($hasOrders);
  30. }
  31. }