![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/amasty/product-attachment/Api/ |
<?php /** * @author Amasty Team * @copyright Copyright (c) Amasty (https://www.amasty.com) * @package Product Attachments Base for Magento 2 */ namespace Amasty\ProductAttachment\Api; interface FileRepositoryInterface { /** * Save file. * * @param \Amasty\ProductAttachment\Api\Data\FileInterface $file * * @throws \Magento\Framework\Exception\CouldNotSaveException * @return \Amasty\ProductAttachment\Api\Data\FileInterface */ public function save(\Amasty\ProductAttachment\Api\Data\FileInterface $file); /** * Save file with relations. * * @param \Amasty\ProductAttachment\Api\Data\FileInterface $file * @param array $params * * @throws \Magento\Framework\Exception\CouldNotSaveException * @return \Amasty\ProductAttachment\Api\Data\FileInterface */ public function saveAll(\Amasty\ProductAttachment\Api\Data\FileInterface $file, $params = []); /** * Retrieve file. * * @param int $fileId * @return \Amasty\ProductAttachment\Api\Data\FileInterface * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function getById($fileId); /** * Retrieve file by Url Hash. * * @param string $hash * @return \Amasty\ProductAttachment\Api\Data\FileInterface * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function getByHash($hash); /** * Delete file. * * @param \Amasty\ProductAttachment\Api\Data\FileInterface $file * @return bool * @throws \Magento\Framework\Exception\LocalizedException */ public function delete(\Amasty\ProductAttachment\Api\Data\FileInterface $file); /** * Delete file by ID. * * @param int $fileId * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException * @throws \Magento\Framework\Exception\LocalizedException */ public function deleteById($fileId); }