ImageContent.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Api;
  7. use Magento\Framework\Api\Data\ImageContentInterface;
  8. /**
  9. * Image Content data object
  10. *
  11. * @codeCoverageIgnore
  12. */
  13. class ImageContent extends AbstractSimpleObject implements ImageContentInterface
  14. {
  15. /**
  16. * {@inheritdoc}
  17. *
  18. * @return string
  19. */
  20. public function getBase64EncodedData()
  21. {
  22. return $this->_get(self::BASE64_ENCODED_DATA);
  23. }
  24. /**
  25. * {@inheritdoc}
  26. *
  27. * @return string
  28. */
  29. public function getType()
  30. {
  31. return $this->_get(self::TYPE);
  32. }
  33. /**
  34. * {@inheritdoc}
  35. *
  36. * @return string
  37. */
  38. public function getName()
  39. {
  40. return $this->_get(self::NAME);
  41. }
  42. /**
  43. * {@inheritdoc}
  44. *
  45. * @param string $data
  46. * @return $this
  47. */
  48. public function setBase64EncodedData($data)
  49. {
  50. return $this->setData(self::BASE64_ENCODED_DATA, $data);
  51. }
  52. /**
  53. * {@inheritdoc}
  54. *
  55. * @param string $mimeType
  56. * @return $this
  57. */
  58. public function setType($mimeType)
  59. {
  60. return $this->setData(self::TYPE, $mimeType);
  61. }
  62. /**
  63. * {@inheritdoc}
  64. *
  65. * @param string $name
  66. * @return $this
  67. */
  68. public function setName($name)
  69. {
  70. return $this->setData(self::NAME, $name);
  71. }
  72. }