mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-07 23:34:58 +00:00
feat: Add new StoredObjectManager
service.
To read and write onto `StoredObject` document using a common interface.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?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;
|
||||
}
|
Reference in New Issue
Block a user