Hello Will,
> I've been trying to figure out how to do DB sessions for quite some time now > by using built in ZF2 functionality. However no one I have talked seems to > have any idea on how to do this. The other option that I have is to build > my own save-handler which works just fine however I would prefer to use > built in functionality since it already exists. I've already posted on > stackoverflow.com as well regarding this and got almost no response, here is > the link: > http://stackoverflow.com/questions/13634490/zf2-dafault-database-session-sto > rage I don't know what the problem is in the first place, but I think there are a few flaws in your approach. For example, you shouldn't instantiate an instance of the session storage in the onBootstrap() method. Use the service manager to retrieve an instance of the session storage when you need it. Also, don't construct what is actually a dependency of the session storage (the database adapter) in the constructor of the session storage. Retrieve the database adapter in the factory for the session storage instead (first, define a database adapter service using the service manager as well. Best regards, Andreas -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
