Skip to content

ObjectListing

One page of ListableObjectStoreClientInterface::listObjects().

$commonPrefixes is only ever non-empty when the call passed a delimiter: it is the “directories” one level below the prefix, the same grouping S3, GCS and Azure each fold keys into when asked to stop at the first delimiter after the prefix. Without a delimiter every matching key comes back in $objects, flat.

final readonly class ObjectListing

Since4.2.0
SourceObjectListing.php
PropertyTypeDescription
$commonPrefixesarrayreadonly.
$nextContinuationToken?``stringreadonly.
$objectsarrayreadonly.

public function __construct(list<ObjectSummary> $objects, list<string> $commonPrefixes, ?string $nextContinuationToken): mixed

Each ending in the delimiter that produced it.

ParameterTypeDescription
$objectslist``<ObjectSummary>In the order the provider returned them.
$commonPrefixeslist``<``string``>Each ending in the delimiter that produced it.
$nextContinuationToken?``string

Returns mixed

MethodDescription
isTruncated(): boolWhether another page follows — pass $nextContinuationToken back in to fetch it.

public function isTruncated(): bool

Whether another page follows — pass $nextContinuationToken back in to fetch it.

Returns bool