FakeRegion.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. declare(strict_types=1);
  8. namespace Magento\TestModuleExtensionAttributes\Model;
  9. use Magento\Framework\Model\AbstractExtensibleModel;
  10. use Magento\TestModuleExtensionAttributes\Api\Data\FakeRegionInterface;
  11. class FakeRegion extends AbstractExtensibleModel implements FakeRegionInterface
  12. {
  13. /**
  14. * Get region
  15. *
  16. * @return string
  17. */
  18. public function getRegion()
  19. {
  20. return $this->getData(self::REGION);
  21. }
  22. /**
  23. * Get region code
  24. *
  25. * @return string
  26. */
  27. public function getRegionCode()
  28. {
  29. return $this->getData(self::REGION_CODE);
  30. }
  31. /**
  32. * Get region id
  33. *
  34. * @return int
  35. */
  36. public function getRegionId()
  37. {
  38. return $this->getData(self::REGION_ID);
  39. }
  40. /**
  41. * {@inheritdoc}
  42. *
  43. * @return \Magento\TestModuleExtensionAttributes\Api\Data\FakeRegionExtensionInterface|null
  44. */
  45. public function getExtensionAttributes()
  46. {
  47. return $this->_getExtensionAttributes();
  48. }
  49. /**
  50. * {@inheritdoc}
  51. *
  52. * @param \Magento\TestModuleExtensionAttributes\Api\Data\FakeRegionExtensionInterface $extensionAttributes
  53. * @return $this
  54. */
  55. public function setExtensionAttributes(
  56. \Magento\TestModuleExtensionAttributes\Api\Data\FakeRegionExtensionInterface $extensionAttributes
  57. ) {
  58. return $this->_setExtensionAttributes($extensionAttributes);
  59. }
  60. }