Welcome Guest, Not a member yet? Register   Sign In
storing objects in CI session
#11

[eluser]Nick_MyShuitings[/eluser]
After you get this working, I'd be interested in the application logic/req that requires this implementation. It seems like a bit of a stretch to store an entire object in the session to keep state...
#12

[eluser]stormbytes[/eluser]
sure thing man. Talking to a friend at the moment, then i'll give this a go and let you know how it went. The key in not overloading the session is storing referencial data in the object, which is then operated on by class methods. I find this to be the best compromise. Ditching the session for the 4k limitation seems wasteful.
#13

[eluser]stormbytes[/eluser]
Okay.. seems to work just fine Smile

Thanks for the help!
#14

[eluser]Nick_MyShuitings[/eluser]
hmm, and that error occurs when you try to access the method, but not when you run the unserialize? Or rather, which step throws the error?
#15

[eluser]stormbytes[/eluser]
I forgot to load the library/class before calling unserialize, that threw the error. I added a load statement and that took care of it. Once polished, I'll add the lib to the autoload array.
#16

[eluser]Nick_MyShuitings[/eluser]
Threw me for a fast one there with your ninja edit... I had responded to the Bah!! no go. by the time I reloaded the page it said all flags green... made me think I was crazy there for a minute.

I'm glad you got it to work.
#17

[eluser]stormbytes[/eluser]
Hah! Yeah I got that Smile

PM sent




Theme © iAndrew 2016 - Forum software by © MyBB