trait ContextTrait

Trait ContextTrait

Properties

ApiClient $apiClient Defined in UploadApi class.

Methods

addContextAsync(array|string $context, array|string $publicIds = [], array $options = [])

Adds context metadata as key-value pairs to the the specified assets.

addContext(array|string $context, array|string $publicIds = [], array $options = [])

Adds context metadata as key-value pairs to the the specified assets.

removeAllContextAsync(array|string $publicIds = [], array $options = [])

Removes all context metadata from the specified assets.

removeAllContext(array $publicIds = [], array $options = [])

Removes all context metadata from the specified assets.

Details

PromiseInterface addContextAsync(array|string $context, array|string $publicIds = [], array $options = [])

Adds context metadata as key-value pairs to the the specified assets.

This is an asynchronous function.

Parameters

Name Type Description
$context array|string The key-value pairs of context metadata.
$publicIds array|string The public IDs of the assets to add context metadata to.
$options array The optional parameters. See the upload API documentation.

Return Value

PromiseInterface

See also

https://cloudinary.com/documentation/image_upload_api_reference#context_method

ApiResponse addContext(array|string $context, array|string $publicIds = [], array $options = [])

Adds context metadata as key-value pairs to the the specified assets.

Parameters

Name Type Description
$context array|string The key-value pairs of context metadata.
$publicIds array|string The public IDs of the assets to add context metadata to.
$options array The optional parameters. See the upload API documentation.

Return Value

ApiResponse

See also

https://cloudinary.com/documentation/image_upload_api_reference#context_method

PromiseInterface removeAllContextAsync(array|string $publicIds = [], array $options = [])

Removes all context metadata from the specified assets.

This is an asynchronous function.

Parameters

Name Type Description
$publicIds array|string The public IDs of the assets to remove context metadata from.
$options array The optional parameters. See the upload API documentation.

Return Value

PromiseInterface

See also

https://cloudinary.com/documentation/image_upload_api_reference#context_method

ApiResponse removeAllContext(array $publicIds = [], array $options = [])

Removes all context metadata from the specified assets.

Parameters

Name Type Description
$publicIds array The public IDs of the assets to remove context metadata from.
$options array The optional parameters. See the upload API documentation.

Return Value

ApiResponse

See also

https://cloudinary.com/documentation/image_upload_api_reference#context_method