\Drupal\strata\Storage PutResult

What a store returns after accepting an object.

Summary

Methods
Properties
Constants
__construct
megabytesPerSecond
jsonSerialize
key
size
etag
multipart
parts
seconds
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

$multipart

$multipart : bool

Type

bool

$parts

$parts : int

Type

int

$seconds

$seconds : float

Type

float

Methods

__construct()

__construct(string  $key, int  $size, string|null  $etag = null, bool  $multipart = false, int  $parts = 1, float  $seconds = 0.0) : mixed

Constructs a result.

Parameters

string $key

The key the object was written to.

int $size

Bytes written.

string|null $etag

The endpoint's entity tag, stored exactly as returned.

bool $multipart

Whether the upload was split into parts.

int $parts

How many parts were sent; 1 for a single put.

float $seconds

Wall-clock time the upload took, for the provider statistics table.

Returns

mixed —

megabytesPerSecond()

megabytesPerSecond() : float

Upload throughput.

Returns

float —

Megabytes per second, or 0.0 when the duration was not recorded.

jsonSerialize()

jsonSerialize() : array<string,mixed>

{@inheritdoc}

Returns

array

The result as a plain array.