$sizes
$sizes : array
Size of every object that was written, keyed by object key.
Accepts objects and stores nothing, recording what a real store would have been asked to hold.
This is what a dry run writes to. An administrator deciding whether to enable a realm can flush against this provider for a day and read the object count, the byte total and the largest object off it, without paying for the storage or the requests.
Reads fail. A store that returned an empty string for a frame it never held would let a restore appear to succeed against nothing, so NullStorage::get() raises with the key that was asked for.
statistics() : array{objects: int, bytes: int, writes: int, deletes: int, largest: int}
What a real store would now be holding.
Distinct keys currently held, their total size, how many writes and deletes were seen, and the largest single object.
put(string $key, mixed $body, array $options = []) : \Drupal\strata\Storage\PutResult
Writes an object.
| string | $key | Object key relative to the store root. |
| mixed | $body | The bytes, or an open readable stream. A stream is read once and not rewound, so a caller that needs it again must seek itself. |
| array | $options | Provider options. |
What was written.
head(string $key) : \Drupal\strata\Storage\ObjectMeta|null
Metadata for one object without reading it.
| string | $key | Object key relative to the store root. |
The metadata, or NULL when the object is absent. Absence is not an error, because every caller of this method is asking precisely in order to find out.
delete(array $keys) : int
Deletes objects.
| array | $keys | Object keys relative to the store root. |
How many keys the endpoint accepted. A store that can tell an absent key from a removed one counts only what it removed; S3 reports success for an absent key and cannot distinguish, so it counts everything it was given. Do not read this as "how many existed" - a prune receipt counts from the frame index, which knows.
list(string $prefix = '', ?string $cursor = null, int $limit = 1000, ?string $delimiter = null) : \Drupal\strata\Storage\ObjectPage
Lists one page of objects under a prefix.
| string | $prefix | Key prefix relative to the store root; an empty string lists everything. |
| ?string | $cursor | Continuation token from a previous page, or NULL to start. |
| int | $limit | Most objects to return in this page. |
| ?string | $delimiter | Grouping delimiter, or NULL for a flat listing. |
The page.
drain(resource $stream) : int
Reads a stream to its end and reports how long it was.
The bytes are discarded, but the stream is still consumed so a caller that hands over a temporary file sees the same behaviour it would from a real store.
| resource | $stream | An open readable stream. |
Bytes read.