I'm having a strange issue with Zend_Session where I am assigning a string
and an object to the same Session Namespace. The object will persist, but
the string won't...I open/start the namespace in init() since I need access
to the session data throughout my controller. I then assign the session
data to a local var in my action for convenience. Not sure if the way I'm
assigning vars is the problem, but in any case the object is persisting and
the string var isn't:
public function init() {
//load session vars
$this->sessionVars = new Zend_Session_Namespace('collection');
//assign string to session as "activeAlbum"
$this->sessionVars->activeAlbum = "top";
$this->activeAlbum =
$this->sessionVars->activeAlbum;
//assign object "Album" to session as "currentAlbum"
$this->sessionVars->currentAlbum = new Album($name='top');
$this->currentAlbum =
$this->sessionVars->currentAlbum;
}
public function listAction() {
//assign string to local var: DOESN'T PERSIST
$currentAlbum = $this->currentAlbum;
//assign Album object to local var: PERSISTS
$activeAlbum = $this->activeAlbum;
....do stuff with $currentAlbum, $activeAlbum, but
$currentAlbum won't persist...
}
Any ideas?
--
View this message in context:
http://www.nabble.com/Session-oddity-tp21058169p21058169.html
Sent from the Zend Framework mailing list archive at Nabble.com.