I am trying to achieve this. I have a session manager class, I developed it for my structure. I need to have unique session keys, so instead of doing something like this:
$_SESSION['foo'] = $bar;
I'm doing it:
Session::set('foo',$bar);
and the set function will do something like this:
$_SESSION[$unique.'foo'] = $bar;
Ok, this works, but I would like to use it like this:
Session['foo'] = $bar
or like this:
Session->foo = $bar
I found that I cannot use → in static objects, and I also cannot use magic functions such as __set and __get. So, is there a way I can achieve this behavior?
source share