Implements required interface to store documents on disk

This commit is contained in:
Julien Fastré 2024-12-15 22:37:59 +01:00
parent e25c1e1816
commit 67b5bc6dba
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 88 additions and 0 deletions

View File

@ -0,0 +1,59 @@
<?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\AsyncUpload\Driver\LocalStorage;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\Entity\StoredObjectVersion;
use Chill\DocStoreBundle\Service\StoredObjectManagerInterface;
class StoredObjectManager implements StoredObjectManagerInterface
{
public function getLastModified(StoredObject|StoredObjectVersion $document): \DateTimeInterface
{
// TODO: Implement getLastModified() method.
}
public function getContentLength(StoredObject|StoredObjectVersion $document): int
{
// TODO: Implement getContentLength() method.
}
public function exists(StoredObject|StoredObjectVersion $document): bool
{
// TODO: Implement exists() method.
}
public function read(StoredObject|StoredObjectVersion $document): string
{
// TODO: Implement read() method.
}
public function write(StoredObject $document, string $clearContent, ?string $contentType = null): StoredObjectVersion
{
// TODO: Implement write() method.
}
public function delete(StoredObjectVersion $storedObjectVersion): void
{
// TODO: Implement delete() method.
}
public function etag(StoredObject|StoredObjectVersion $document): string
{
// TODO: Implement etag() method.
}
public function clearCache(): void
{
// TODO: Implement clearCache() method.
}
}

View File

@ -0,0 +1,29 @@
<?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\AsyncUpload\Driver\LocalStorage;
use Chill\DocStoreBundle\AsyncUpload\SignedUrl;
use Chill\DocStoreBundle\AsyncUpload\SignedUrlPost;
use Chill\DocStoreBundle\AsyncUpload\TempUrlGeneratorInterface;
class TempUrlLocalStorageGenerator implements TempUrlGeneratorInterface
{
public function generate(string $method, string $object_name, ?int $expire_delay = null): SignedUrl
{
// TODO: Implement generate() method.
}
public function generatePost(?int $expire_delay = null, ?int $submit_delay = null, int $max_file_count = 1, ?string $object_name = null): SignedUrlPost
{
// TODO: Implement generatePost() method.
}
}