Namespaced Sessions

Permalink 1 user found helpful
Has one of you managed to get namespaced sessions to work in C57?
E.g.

Session::set('sm/filters/country', ['data']);
$filters = Session::get('sm/filters'); //shows null


http://symfony.com/doc/current/components/http_foundation/sessions....

A3020
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi A3020,

Have you tried something like this instead of using Session directly?
$session = Core::make('app')->make('session');


https://github.com/concrete5/concrete5/issues/3278#issuecomment-1688...
A3020 replied on at Permalink Reply
A3020
Hm, after some more testing I don't think it's possible with the current implementation in C5. Thing is that the 'bags' need to be registered before the session starts.

And the current session bag is using AttributeBag instead of NamespacesAttributeBag.

I'll post an issue on Github to see what the others think about it.