chill-bundles/src/Bundle/ChillDocStoreBundle/Service/StoredObjectManagerInterface.php
Pol Dellaiera 62af980ea5
feat: Add new StoredObjectManager service.
To read and write onto `StoredObject` document using a common interface.
2022-03-15 13:41:38 +01:00

35 lines
835 B
PHP

<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\DocStoreBundle\Service;
use Chill\DocStoreBundle\Entity\StoredObject;
interface StoredObjectManagerInterface
{
/**
* Get the content of a StoredObject.
*
* @param StoredObject $document The document.
*
* @return string The retrieved content in clear.
*/
public function read(StoredObject $document): string;
/**
* Set the content of a StoredObject.
*
* @param StoredObject $document The document.
* @param $clearContent The content to store in clear.
*/
public function write(StoredObject $document, string $clearContent): void;
}