public static function getCoresBasePedido() { $CorProdutoDao = new CorProdutoDao(); try { $Cores = $CorProdutoDao->getCoresBasePedido($_GET); if ($Cores) { Flight::json($Cores); } else { Flight::halt(404, 'Não há resultado para a busca'); } } catch (ExceptionJSON $e) { $e->enviaJSON(); } }