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