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>} Report.

get_driver() static

Get a working driver for the given format.

Since: 1.0.0
Line: 188

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: 213

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: 226

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: 237

static public function flush(  ): void;

Returns: void