Please note that all objects to be composed must come from the same
bucket.
Example:
$sourceObjects = ['log1.txt', 'log2.txt'];
$singleObject = $bucket->compose($sourceObjects, 'combined-logs.txt');
Use an instance of StorageObject.
$sourceObjects = [
$bucket->object('log1.txt'),
$bucket->object('log2.txt')
];
$singleObject = $bucket->compose($sourceObjects, 'combined-logs.txt');
public compose ( array $sourceObjects, string $name, array $options = [] ) : |
||
$sourceObjects | array | The objects to compose. |
$name | string | The name of the composed object. |
$options | array | [optional] { Configuration options. @type string $predefinedAcl Predefined ACL to apply to the composed object. Acceptable values include, `"authenticatedRead"`, `"bucketOwnerFullControl"`, `"bucketOwnerRead"`, `"private"`, `"projectPrivate"`, and `"publicRead"`. **Defaults to** `"private"`. @type array $metadata Metadata to apply to the composed object. The available options for metadata are outlined at the [JSON API docs](https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request-body). @type string $ifGenerationMatch Makes the operation conditional on whether the object's current generation matches the given value. @type string $ifMetagenerationMatch Makes the operation conditional on whether the object's current metageneration matches the given value. } |
Результат |