$multipart
$multipart : bool
What one storage endpoint can actually do.
S3 compatibility is a spectrum. AWS, Cloudflare R2, MinIO, Backblaze B2, Wasabi, Ceph RGW and Garage all speak the same verbs and disagree on the details: whether a batch delete exists, whether conditional writes are honoured, which checksum headers are accepted, whether an object can be listed by version. Assuming a capability that is absent produces a failure at flush time on someone else's infrastructure; assuming its absence gives up throughput on every provider that has it.
A provider therefore probes its endpoint once and reports the answers here. Every consumer branches on this object rather than on a provider class name, so an add-on provider is not a special case in the engine.
__construct(bool $multipart = false, bool $batchDelete = false, bool $conditionalWrite = false, bool $rangeRead = true, bool $presign = false, bool $checksums = false, bool $storageClasses = false, int $maxSinglePut = 5368709120, int $minPartSize = 5242880, int $maxPartSize = 5368709120, int $maxParts = 10000, int $maxBatchDelete = 1000, bool $uniformPartSize = false) : mixed
Constructs a capability set.
| bool | $multipart | Whether uploads can be split into parts. Required for objects above $maxSinglePut. |
| bool | $batchDelete | Whether many keys can be deleted in one request. Pruning is enormously cheaper with it. |
| bool | $conditionalWrite | Whether If-Match and If-None-Match are honoured on PutObject. Used to make a ref update safe against a concurrent writer. |
| bool | $rangeRead | Whether a byte range can be requested. Without it a single frame cannot be read out of a pack and the whole pack must come down. |
| bool | $presign | Whether a time-limited URL can be generated. |
| bool | $checksums | Whether the endpoint accepts the x-amz-checksum-* family. Several S3-compatible services reject them outright, so they are sent only where they are known to work. |
| bool | $storageClasses | Whether an infrequent-access tier can be selected per object. |
| int | $maxSinglePut | Largest object accepted in one PutObject, in bytes. |
| int | $minPartSize | Smallest multipart part except the last, in bytes. |
| int | $maxPartSize | Largest multipart part, in bytes. |
| int | $maxParts | Most parts one multipart upload may have. |
| int | $maxBatchDelete | Most keys one batch delete may name. |
| bool | $uniformPartSize | Whether every part except the last must be exactly the same size. R2 requires this; AWS does not. |
maxObjectSize() : int
The largest object this endpoint can store at all.
The multipart product is saturated rather than left to overflow: the part limits come from a
probe reading whatever the endpoint said, and maxPartSize * maxParts past PHP_INT_MAX becomes
a float, which this return type would reject with a bare TypeError.
Bytes, counting multipart when it is available; PHP_INT_MAX when the product is larger than an int can hold, which no object can reach anyway.
partSizeFor(int $bytes) : int
The part size to use for an object.
Chooses the smallest part size that keeps the part count within $maxParts, rounded up to a whole mebibyte so the sizes stay uniform for endpoints that require it.
| int | $bytes | Object size. |
Part size in bytes, never below $minPartSize or above $maxPartSize.
with(array$overrides) : self
The same capabilities with individual flags overridden.
Probing refines an assumed set rather than replacing it, and the object is readonly.
| array |
$overrides | Constructor parameter names keyed to their new values. Unknown names are ignored, so a probe written against a newer version does not fatal on an older one. |
A new capability set.