class Cloudinary

Defines the Cloudinary instance.

Properties

Configuration $configuration Defines the Cloudinary cloud details and other global configuration options.

Methods

__construct(Configuration|string|array|null $config = null)

Cloudinary constructor.

image(string $publicId)

Creates a new Image instance using the current configuration instance.

video(string|mixed $publicId)

Creates a new Video instance using the current configuration instance.

raw(string|mixed $publicId)

Creates a new Raw instance using the current configuration instance.

tag()

Returns an instance of the TagBuilder class that includes builders for all tags.

imageTag(string|mixed $publicId)

Creates a new ImageTag instance using the current configuration instance.

videoTag(string|mixed $publicId, array|null $sources = null)

Creates a new VideoTag instance using the current configuration instance.

adminApi()

Creates a new AdminApi instance using the current configuration instance.

uploadApi()

Creates a new UploadApi instance using the current configuration instance.

searchApi()

Creates a new SearchApi instance using the current configuration instance.

Details

__construct(Configuration|string|array|null $config = null)

Cloudinary constructor.

Parameters

Name Type Description
$config Configuration|string|array|null The Configuration source.

Image image(string $publicId)

Creates a new Image instance using the current configuration instance.

Parameters

Name Type Description
$publicId string The public ID of the image.

Return Value

Image

Video video(string|mixed $publicId)

Creates a new Video instance using the current configuration instance.

Parameters

Name Type Description
$publicId string|mixed The public ID of the video.

Return Value

Video

File raw(string|mixed $publicId)

Creates a new Raw instance using the current configuration instance.

Parameters

Name Type Description
$publicId string|mixed The public ID of the file.

Return Value

File

TagBuilder tag()

Returns an instance of the TagBuilder class that includes builders for all tags.

Return Value

TagBuilder

ImageTag imageTag(string|mixed $publicId)

Creates a new ImageTag instance using the current configuration instance.

Parameters

Name Type Description
$publicId string|mixed The public ID of the image.

Return Value

ImageTag

VideoTag videoTag(string|mixed $publicId, array|null $sources = null)

Creates a new VideoTag instance using the current configuration instance.

Parameters

Name Type Description
$publicId string|mixed The public ID of the video.
$sources array|null The tag src definition.

Return Value

VideoTag

AdminApi adminApi()

Creates a new AdminApi instance using the current configuration instance.

Return Value

AdminApi

UploadApi uploadApi()

Creates a new UploadApi instance using the current configuration instance.

Return Value

UploadApi

SearchApi searchApi()

Creates a new SearchApi instance using the current configuration instance.

Return Value

SearchApi

Constants

VERSION

The current version of the SDK.