4 namespace Friendica\Core\Session;
6 use Friendica\Model\User\Cookie;
9 * Contains the base methods for $_SESSION interaction
16 public function __construct( Cookie $cookie)
18 $this->cookie = $cookie;
24 public function start()
32 public function exists(string $name)
34 return isset($_SESSION[$name]);
40 public function get(string $name, $defaults = null)
42 return $_SESSION[$name] ?? $defaults;
48 public function set(string $name, $value)
50 $_SESSION[$name] = $value;
56 public function setMultiple(array $values)
58 $_SESSION = $values + $_SESSION;
64 public function remove(string $name)
66 unset($_SESSION[$name]);
72 public function clear()