Warning: session_start(): open(/var/lib/php/sessions/sess_ah92c1usee6rpoi06hlt5uiu5u, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static Map status_map; // key = dialog id
static abstract class Status {
abstract S answer(S s);
}
// get status
static synchronized Status status() {
status_load();
ret status_map.get(getDialogID());
}
static void status_load() {
if (status_map == null) {
status_map = new TreeMap;
load("status_map");
}
}
// set status
static synchronized void status(Status s) {
status_load();
if (s == null)
status_map.remove(getDialogID());
else
status_map.put(getDialogID(), s);
save("status_map");
}
static S status_answer(S s) {
Status status = status();
if (status != null)
ret status.answer(s);
ret null;
}