feat(core): add system store service interface

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-08-28 20:18:18 -04:00
parent 52166feca2
commit f0598412f3
6 changed files with 230 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace KTXF\SystemStore;
use DateTimeImmutable;
use InvalidArgumentException;
/**
* Provider-neutral information about a blob in a system store.
*/
final readonly class BlobInfo
{
public function __construct(
public string $key,
public string $mimeType,
public int $size,
public string $etag,
public DateTimeImmutable $modifiedAt,
public array $attributes = [],
) {
if ($this->key === '') {
throw new InvalidArgumentException('Blob key cannot be empty');
}
if ($this->mimeType === '') {
throw new InvalidArgumentException('Blob MIME type cannot be empty');
}
if ($this->size < 0) {
throw new InvalidArgumentException('Blob size cannot be negative');
}
if ($this->etag === '') {
throw new InvalidArgumentException('Blob ETag cannot be empty');
}
}
}