Recent

Capabilitiesclass

Capabilities

Verifies and caches driver support by encoding a bundled probe image.

Namespace: WebberZone\Image_Optimizer
Since: 1.0.0
Source: includes/class-capabilities.php line 24

Methods

get() static

Get the capability report.

Since: 1.0.0
Line: 60

static public function get( bool $force = ... ): array;
Type Name Description
bool $force Whether to discard the cached report and probe again.

Returns: array — string, drivers: array<string, array<string, bool>>, formats: array<string, string>, quality: array<string, bool>} Report.

quality_is_honoured() static

Whether the driver serving a format acts on the quality argument.

Since: 1.1.0
Line: 212

static public function quality_is_honoured( string $format ): bool;
Type Name Description
string $format Target format slug.

Returns: bool — True when quality changes the encoded output.

get_driver() static

Get a working driver for the given format.

Since: 1.0.0
Line: 277

static public function get_driver( string $format ): ?Driver;
Type Name Description
string $format Target format slug.

Returns: ?Driver — Driver instance, or null when the format is unsupported.

supports() static

Whether the server can encode the given format.

Since: 1.0.0
Line: 302

static public function supports( string $format ): bool;
Type Name Description
string $format Target format slug.

Returns: bool — True when supported.

get_supported_formats() static

Formats this server can encode, in delivery preference order.

Since: 1.0.0
Line: 315

static public function get_supported_formats(  ): array;

Returns: array — string> Format slugs.

flush() static

Discard the cached report so the next call probes again.

Since: 1.0.0
Line: 326

static public function flush(  ): void;

Returns: void

get_originals() static

Verify original encoders separately from delivery formats.

Line: 337

static public function get_originals( bool $force = ... ): array;
Type Name Description
bool $force Refresh cached probes.

Returns: array — bool, png: bool} Original encoders.