View Single Post
Old 10-07-2009, 12:41 AM   #13 (permalink)
adamdecaf
The Addict
 
adamdecaf's Avatar
 
Join Date: May 2009
Posts: 309
Thanks: 5
adamdecaf is on a distinguished road
Default

Quote:
Originally Posted by svdelle View Post
Yeah, and why all this talk about singleton in PHP when ALL variables containing a singleton is destroyed on new request.

It seems we have this great pattern that is absolutely useless when it comes to singleton and sessions.

How do I store a language variable in a session using a singleton without it being destroyed on every request.

I'd like to avoid having to add a lang=n to all links througout a whole website, but store a language value i session using a singleton?
You could store it in a cookie or database.
__________________
My Site
adamdecaf is offline  
Reply With Quote