3 namespace Friendica\Core\Session;
6 * Usable for backend processes (daemon/worker) and testing
8 final class Memory implements ISession
12 public function start()
14 // Backward compatibility until all Session variables are replaced
15 // with the Session class
24 public function exists(string $name)
26 return isset($this->data[$name]);
32 public function get(string $name, $defaults = null)
34 return $this->data[$name] ?? $defaults;
40 public function set(string $name, $value)
42 $this->data[$name] = $value;
48 public function setMultiple(array $values)
50 foreach ($values as $key => $value) {
51 $this->data[$key] = $value;
58 public function remove(string $name)
60 if ($this->exists($name)) {
61 unset($this->data[$name]);
71 public function clear()
80 public function delete()