public static function getBasePedido($offset, $limit) { $ProdutoDao = new ProdutoDao(); $base = $ProdutoDao->getBasePedido('flg_base', $offset, $limit, $_GET); $saida = array('base' => $base); if ($saida) { Flight::json($saida); } else { Flight::halt(404, 'Não há resultado para a busca'); } }