public static function getAllVendas($offset, $limit) { $VendaDao = new VendaDao(); $itens = $VendaDao->getAllVendas($offset, $limit, $_GET); if ($itens) { Flight::json($itens); } else { Flight::halt(404, 'Não há resultado para a busca'); } }