FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Session.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class Session{
6 
7  public $_namespace = [];
8 
9  public function __construct($namespace){
10  $this->_namespace = explode('\\',$namespace);
11  }
12 
13  protected function key($key){
14  return array_merge($this->_namespace,is_array($key) ? $key : [$key]);
15  }
16 
17  public function get($key){
18  return \Rsi\Record::get($_SESSION,$this->key($key));
19  }
20 
21  public function set($key,$value){
22  return \Rsi\Record::set($_SESSION,$this->key($key),$value);
23  }
24 
25  public function delete($key){
26  \Rsi\Record::delete($_SESSION,$this->key($key));
27  }
28 
29  public function __get($key){
30  return $this->get($key);
31  }
32 
33  public function __set($key,$value){
34  $this->set($key,$value);
35  }
36 
37 }
__set($key, $value)
Definition: Session.php:33
__construct($namespace)
Definition: Session.php:9