PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / classes / Bulk / BulkOptimizerInterface.php

BulkOptimizerInterface.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF trunk, at classes/Bulk/BulkOptimizerInterface.php

26 lines 728 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 declare(strict_types=1);
3
4 namespace Imagify\Bulk;
5
6 /**
7 * Interface for the bulk optimizer.
8 *
9 * Abstracts the `run_optimize()` entry point so that callers (e.g. MCP abilities)
10 * can depend on this interface rather than the final `Bulk` class, keeping them
11 * independently testable.
12 *
13 * @since 2.3.0
14 */
15 interface BulkOptimizerInterface {
16
17 /**
18 * Runs the bulk optimization for the given context and optimization level.
19 *
20 * @param string $context Optimization context: 'wp' or 'custom-folders'.
21 * @param int $optimization_level Optimization level (0–2).
22 * @return array{success: bool, message: string}
23 */
24 public function run_optimize( string $context, int $optimization_level ): array;
25 }
26