\Drupal\strata\Storage ObjectMeta

What a store knows about one object without reading it.

Summary

Methods
Properties
Constants
__construct
jsonSerialize
key
size
etag
modified
storageClass
metadata
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$key

$key : string

Type

string

$size

$size : int

Type

int

$etag

$etag : ?string

Type

string|null

$modified

$modified : ?int

Type

int|null

$storageClass

$storageClass : ?string

Type

string|null

$metadata

$metadata : array

Type

array<string|int, mixed>

Methods

__construct()

__construct(string  $key, int  $size, string|null  $etag = null, int|null  $modified = null, string|null  $storageClass = null, array  $metadata = []) : mixed

Constructs object metadata.

Parameters

string $key

The object key, relative to the store root.

int $size

Size in bytes.

string|null $etag

The endpoint's entity tag, stored exactly as it was returned. Quotes are part of the value on several providers, and R2 rejects a CompleteMultipartUpload whose part tags were normalised, so it is never trimmed.

int|null $modified

Unix timestamp of the last write, or NULL when the endpoint does not report one.

string|null $storageClass

The tier the object sits in, or NULL.

array $metadata

User metadata the object carries.

Returns

mixed —

jsonSerialize()

jsonSerialize() : array<string,mixed>

{@inheritdoc}

Returns

array

The metadata as a plain array.