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