Posted by afrinspray on 09/28/18 11:41
I have one session object:
$_SESSION['session_object'] = new SessionObject(some values here);
And inside the SessionObject class definition, I'm creating two other
objects:
class SessionObject {
public function __construct(...) {
...
$this->class1 = serialize(new Class1(...));
...
}
}
Here's an example of a get function I'm using:
public function &getClass1() {
$unserialized_obj = unserialize($this->class1);
return $unserialized_lock;
}
How can I set some values in Class1 and Class2 and have them carry from
page to page? What am I missing? I think my references technique is
kinda screwed up. Can I set values of objects inside objects in
sessions?
Thanks,
Mike
[Back to original message]
|