mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
- removed @since 2.0.0 as it is a base release - updated version in @since and @deprecated tag taking into account all patch releases
82 lines
1.7 KiB
PHP
82 lines
1.7 KiB
PHP
<?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);
|
|
}
|
|
}
|