mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
The controller is tested from real request scraped from apache mod_dav implementation. The requests were scraped using a wireshark-like tool. Those requests have been adapted to suit to our xml.
48 lines
1.3 KiB
PHP
48 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* 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.
|
|
*/
|
|
|
|
namespace Chill\DocStoreBundle\Service;
|
|
|
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
|
use Chill\DocStoreBundle\Exception\StoredObjectManagerException;
|
|
|
|
interface StoredObjectManagerInterface
|
|
{
|
|
public function getLastModified(StoredObject $document): \DateTimeInterface;
|
|
|
|
public function getContentLength(StoredObject $document): int;
|
|
|
|
/**
|
|
* Get the content of a StoredObject.
|
|
*
|
|
* @param StoredObject $document the document
|
|
*
|
|
* @return string the retrieved content in clear
|
|
*
|
|
* @throws StoredObjectManagerException if unable to read or decrypt the content
|
|
*/
|
|
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
|
|
*
|
|
* @throws StoredObjectManagerException
|
|
*/
|
|
public function write(StoredObject $document, string $clearContent): void;
|
|
|
|
public function etag(StoredObject $document): string;
|
|
|
|
public function clearCache(): void;
|
|
}
|