Welcome Guest, Not a member yet? Register   Sign In
The session class has a push method but no pop method
#5

(02-27-2019, 11:06 AM)kilishan Wrote: Since the Session drivers work hand-in-hand with core PHP functionality, you don't need special features for this. You can modify $_SESSION directly. So what you've shown is perfect solution.

The only reason we've kept some of the old methods from prior versions of CI is to maintain some backward compatibility and some features like Flash so you don't have to manage it yourself. Otherwise, once the session is initialized with session() you can manipulate $_SESSION directly and it will use the driver you've chosen in the config file.

I understand but for me it is more a question of programming style. When I have a push version I would also like to have a pop version. Otherwise I also do not need the push version. I have a setter and a getter method etc.

It is already the second time that I was astonished that I use session::get and session::has a few lines before and then I am doing the manipulation directly on $_SESSION. And after the second time I posted this message.
Reply


Messages In This Thread
RE: The session class has a push method but no pop method - by HardyW - 02-27-2019, 02:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB