123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Downloadable\Model\File;
- use Magento\Downloadable\Api\Data\File\ContentInterface;
- /**
- * @codeCoverageIgnore
- */
- class Content extends \Magento\Framework\Model\AbstractExtensibleModel implements ContentInterface
- {
- const DATA = 'file_data';
- const NAME = 'name';
- /**
- * {@inheritdoc}
- * @codeCoverageIgnore
- */
- public function getFileData()
- {
- return $this->getData(self::DATA);
- }
- /**
- * {@inheritdoc}
- * @codeCoverageIgnore
- */
- public function getName()
- {
- return $this->getData(self::NAME);
- }
- /**
- * Set data (base64 encoded content)
- *
- * @param string $fileData
- * @return $this
- * @codeCoverageIgnore
- */
- public function setFileData($fileData)
- {
- return $this->setData(self::DATA, $fileData);
- }
- /**
- * Set file name
- *
- * @param string $name
- * @return $this
- * @codeCoverageIgnore
- */
- public function setName($name)
- {
- return $this->setData(self::NAME, $name);
- }
- /**
- * {@inheritdoc}
- *
- * @return \Magento\Downloadable\Api\Data\File\ContentExtensionInterface|null
- */
- public function getExtensionAttributes()
- {
- return $this->_getExtensionAttributes();
- }
- /**
- * {@inheritdoc}
- *
- * @param \Magento\Downloadable\Api\Data\File\ContentExtensionInterface $extensionAttributes
- * @return $this
- */
- public function setExtensionAttributes(
- \Magento\Downloadable\Api\Data\File\ContentExtensionInterface $extensionAttributes
- ) {
- return $this->_setExtensionAttributes($extensionAttributes);
- }
- }
|