db_manager = $db_manager; } public function create_report($type, $data) { switch ($type) { case 'product_categories_summary': return new StudiouWC_Product_Categories_Report($this->db_manager, $data); default: throw new InvalidArgumentException("Unknown report type: $type"); } } public function get_available_report_types() { return array( 'product_categories_summary' => __('Product Categories and Variants Summary', StudiouWC_Main::get_text_domain()) ); } public function is_valid_report_type($type) { $available_types = array_keys($this->get_available_report_types()); return in_array($type, $available_types); } }