|
Posted by Aaron Saray on 01/15/08 03:04
On Jan 14, 4:08 am, Jonas Werres <jo...@example.org> wrote:
> > Thanks for any info...
>
> Yes, it is serialized automatically. Which directly leads to the question:
> Can I store objects in sessions?
> Yes, you can, but you have to be sure, that the class definition is
> included/includeable by autoload ON EVERY PAGE THE SESSION IS LOADED.
> Yes, loaded. Not every page, the object is used but on every page the
> session is loaded, because in other cases, the object will break when
> unserialising.
Not to digress too much, but if storing objects in the session, it is
useful to be familiar with the magic sleep and wakeup methods. I've
made this mistake a few times - and caused a few issues with other
resources stored as references inside of the objects.
Navigation:
[Reply to this message]
|