public static function append($id, $msg) { // blockieren Semphore::p(); $counter = Globals::get('counter', 0); $counter++; Globals::put('counter', $counter); $textToAdd = $counter . ";" . $id . ";" . time() . ";" . $msg . PHP_EOL; $myfile = fopen(self::FILE, "a") or die("Unable to open file!"); fwrite($myfile, $textToAdd); fclose($myfile); // freigeben Semphore::v(); }
public static function add($ip) { $allIPs = Globals::get('ips', ''); $allIPs = $allIPs . ";" . $ip; Globals::put('ips', $allIPs); }
public static function update($ipString) { Globals::put('neighbor', $ipString); // return current neighbor ip return self::get(); }
public static function server() { Globals::put(ROLE, SERVER); }
public static function update($name) { Globals::put('group', $name); // return current name return self::get(); }
public static function add($ip) { $allIPs = Globals::get(NAME, ''); $allIPs = $allIPs . DIVISOR . $ip; Globals::put(NAME, $allIPs); }