Implements StoredObjectManager for local storage

This commit is contained in:
2024-12-19 17:09:16 +01:00
parent 1f6de3cb11
commit c1e449f48e
9 changed files with 466 additions and 11 deletions

View File

@@ -34,4 +34,29 @@ final class StoredObjectManagerException extends \Exception
{
return new self('Unable to get content from response.', 500, $exception);
}
public static function unableToStoreDocumentOnDisk(?\Throwable $exception = null): self
{
return new self('Unable to store document on disk.', previous: $exception);
}
public static function unableToFindDocumentOnDisk(string $path): self
{
return new self('Unable to find document on disk at path "'.$path.'".');
}
public static function unableToReadDocumentOnDisk(string $path): self
{
return new self('Unable to read document on disk at path "'.$path.'".');
}
public static function unableToEncryptDocument(string $errors): self
{
return new self('Unable to encrypt document: '.$errors);
}
public static function storedObjectDoesNotContainsVersion(): self
{
return new self('Stored object does not contains any version');
}
}