/** * Choose which type of deletion needs to be accomplished and route through * the correct method of Delete. */ private function deletion_routing($data) { $delete_content = new Delete(); if ($data['type'] == 'all') { $return = $delete_content->delete_all_test_data(); } else { $return = $delete_content->delete_objects($data); } $clean = $this->reporting->create_report($return); echo $clean; }