Exemplo n.º 1
0
                            $eqLogic_db = jeenode::byId($eqLogic_ajax['id']);
                            $eqLogic_db->remove();
                        }
                    }
                    foreach ($eqReal_db->getEqLogic() as $eqLogic_db) {
                        if (!isset($enable_eqLogic[$eqLogic_db->getId()])) {
                            $eqLogic_db->remove();
                        }
                    }
                    break;
            }
        }
        ajax::success();
    }
    if (init('action') == 'getJeenodeConf') {
        $jeenodeReal = jeenodeReal::byId(init('jeenodeRealId'));
        if (!is_object($jeenodeReal)) {
            throw new Exception('JeenodeReal inconnu verifié l\'id');
        }
        $return = utils::o2a($jeenodeReal);
        $return['port'] = array();
        foreach ($jeenodeReal->getEqLogic() as $eqLogic) {
            $portConfiguration = utils::o2a($eqLogic);
            $portConfiguration['cmd'] = utils::o2a($eqLogic->getCmd());
            $return['port'][] = $portConfiguration;
        }
        ajax::success($return);
    }
    throw new Exception('Aucune methode correspondante');
    /*     * *********Catch exeption*************** */
} catch (Exception $e) {