send([ "operation" => "PostMessage", "message" => $message, "username" => $username, "location" => $location, //TODO implémenter la récupération d'id depuis la bdd "id" => uniqid(), "channelType" => "Emergency", "channelName" => is_null($URL_0) ? "" : "$URL_0" ]); $wsi->close(); return ["sent" => true]; //TODO: tout poster dans la BDD } public function DELETE_emergency($argv){ extract($argv); $wsi = new wsinterop("localhost",9998); $wsi->send([ "operation" => "DelMessage", "id" => $id, "channelType" => "Emergency", "channelName" => is_null($URL_0) ? "" : "$URL_0" ]); $wsi->close(); return ["sent" => true]; //TODO: tout poster dans la BDD } }