| 1 |
<?php |
| 2 |
namespace ImageOptimization\Modules\Stats; |
| 3 |
|
| 4 |
use ImageOptimization\Classes\Module_Base; |
| 5 |
|
| 6 |
if ( ! defined( 'ABSPATH' ) ) { |
| 7 |
exit; // Exit if accessed directly. |
| 8 |
} |
| 9 |
|
| 10 |
class Module extends Module_Base { |
| 11 |
public function get_name(): string { |
| 12 |
return 'stats'; |
| 13 |
} |
| 14 |
|
| 15 |
public static function component_list(): array { |
| 16 |
return [ |
| 17 |
'Optimization_Stats_Handler', |
| 18 |
]; |
| 19 |
} |
| 20 |
public static function routes_list(): array { |
| 21 |
return [ |
| 22 |
'Get_Stats', |
| 23 |
'Get_Optimization_Details', |
| 24 |
]; |
| 25 |
} |
| 26 |
|
| 27 |
/** |
| 28 |
* Module constructor. |
| 29 |
*/ |
| 30 |
public function __construct() { |
| 31 |
$this->register_routes(); |
| 32 |
$this->register_components(); |
| 33 |
} |
| 34 |
} |
| 35 |
|