public static function getMesas($offset, $limit) { $MesaDao = new MesaDao(); $mesas = $MesaDao->getMesas($offset, $limit, $_GET); if ($mesas) { Flight::json($mesas); } else { Flight::halt(404, 'Não a dados para a busca'); } }