function postVoicekey() { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $dataStr = file_get_contents("php://input"); $textCollection = TextCollection::getInstance(); echo $textCollection->setAllVoicekeyFromJsonStr($dataStr); $a = array("success" => true, "msg" => "ok"); echo json_encode($a); } else { throw new Exception("Is not a POST method"); } }
/** Chargement des fichiers de config et texte */ private function loadconfig() { //$this->confArray = JsonUtils (CONF_FILE_GLOBAL); $this->textCollection = TextCollection::getInstance(); }