[Solar-talk] Adapter-aware session package

Antti Holvikari anttih at gmail.com
Mon Nov 5 06:53:28 CST 2007


On Nov 5, 2007, at 2:05 PM, Rodrigo Moraes wrote:

> On Oct 31, 2007 6:37 PM, Antti Holvikari wrote:
>> One problem we need to solve is that it doesn't make sense to
>> instantiate a Solar_Session instance for every `$_SESSION['class']`
>> -storage-space. So, I created a Solar_Session_Store class which
>> handles reading and writing to $_SESSION array. This class is  
>> intended
>> to be instantiated for every class that needs storage-space in
>> $_SESSION. This means you'd instantiate Solar_Session_Store instead  
>> of
>> Solar_Session directly.
>
> Maybe add a factory in Solar_Session_Adapter to return a new
> Solar_Session_Store?

Sorry If I wasn't clear enough, but the Solar_Session_Store is meant  
to replace Solar_Session in it's current use. That is to say, we would  
have separate classes for session logic and session data store.
>
> Looks great, Antti. :)


Thanks man :-D

Have you tried it?

--
Antti





More information about the Solar-talk mailing list