ContentInterface.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Downloadable\Api\Data\File;
  7. /**
  8. * @codeCoverageIgnore
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface ContentInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  13. {
  14. /**
  15. * Retrieve data (base64 encoded content)
  16. *
  17. * @return string
  18. */
  19. public function getFileData();
  20. /**
  21. * Set data (base64 encoded content)
  22. *
  23. * @param string $fileData
  24. * @return $this
  25. */
  26. public function setFileData($fileData);
  27. /**
  28. * Retrieve file name
  29. *
  30. * @return string
  31. */
  32. public function getName();
  33. /**
  34. * Set file name
  35. *
  36. * @param string $name
  37. * @return $this
  38. */
  39. public function setName($name);
  40. /**
  41. * Retrieve existing extension attributes object or create a new one.
  42. *
  43. * @return \Magento\Downloadable\Api\Data\File\ContentExtensionInterface|null
  44. */
  45. public function getExtensionAttributes();
  46. /**
  47. * Set an extension attributes object.
  48. *
  49. * @param \Magento\Downloadable\Api\Data\File\ContentExtensionInterface $extensionAttributes
  50. * @return $this
  51. */
  52. public function setExtensionAttributes(
  53. \Magento\Downloadable\Api\Data\File\ContentExtensionInterface $extensionAttributes
  54. );
  55. }