class AnimatedFormat extends BaseAction

Defines the animated format of the delivered asset.

Methods

__construct(array ...$value)

Format constructor.

addQualifier(BaseComponent $qualifier = null)

Adds the qualifier to the action.

addQualifiers(array ...$qualifiers)

Adds qualifiers to the action.

setGenericAction(string $action)

Adds (sets) generic (raw) action.

setFlag(FlagQualifier $flag, bool $set = true)

Sets the flag.

unsetFlag(FlagQualifier $flag)

Removes the flag.

importAction(BaseAction|null $action)

Imports (merges) qualifiers and flags from another action.

jsonSerialize()

Serializes to json.

__toString()

Serializes to Cloudinary URL format

webp()

Animated image format webp.

gif()

Animated image format gif.

png()

Animated image format png.

auto()

Animated image auto format.

format(string $format)

Sets file format.

lossy(bool $useLossy = true)

Automatically use lossy compression when delivering animated GIF files.

Details

__construct(array ...$value)

Format constructor.

Parameters

Name Type Description
...$value array

$this addQualifier(BaseComponent $qualifier = null)

Adds the qualifier to the action.

Parameters

Name Type Description
$qualifier BaseComponent The qualifier to add.

Return Value

$this

$this addQualifiers(array ...$qualifiers)

Adds qualifiers to the action.

Parameters

Name Type Description
...$qualifiers array The qualifiers to add.

Return Value

$this

BaseAction setGenericAction(string $action)

Adds (sets) generic (raw) action.

Parameters

Name Type Description
$action string The generic action string.

Return Value

BaseAction

$this setFlag(FlagQualifier $flag, bool $set = true)

Sets the flag.

Parameters

Name Type Description
$flag FlagQualifier The flag to set.
$set bool Indicates whether to set(true) or unset(false) the flag instead. (Used for avoiding if conditions all over the code)

Return Value

$this

$this unsetFlag(FlagQualifier $flag)

Removes the flag.

Parameters

Name Type Description
$flag FlagQualifier The flag to unset.

Return Value

$this

$this importAction(BaseAction|null $action)

Imports (merges) qualifiers and flags from another action.

Parameters

Name Type Description
$action BaseAction|null The action to import.

Return Value

$this

mixed jsonSerialize()

Serializes to json.

Return Value

mixed

string __toString()

Serializes to Cloudinary URL format

Return Value

string

static AnimatedFormatTrait webp()

Animated image format webp.

Return Value

AnimatedFormatTrait

static AnimatedFormatTrait gif()

Animated image format gif.

Return Value

AnimatedFormatTrait

static AnimatedFormatTrait png()

Animated image format png.

Return Value

AnimatedFormatTrait

static AnimatedFormatTrait auto()

Animated image auto format.

Return Value

AnimatedFormatTrait

AnimatedFormat format(string $format)

Sets file format.

Parameters

Name Type Description
$format string The file format.

Return Value

AnimatedFormat

AnimatedFormat lossy(bool $useLossy = true)

Automatically use lossy compression when delivering animated GIF files.

Parameters

Name Type Description
$useLossy bool Indicates whether to use lossy compression.

Return Value

AnimatedFormat

See also

Flag::lossy

Constants

MAIN_QUALIFIER