Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2008, 01:46 PM
MiK MiK is offline
Junior Member
 
Join Date: Mar 2008
Location: Ancona, Italy
Posts: 21
Send a message via MSN to MiK
Default Zend_Session_Namespace::setExpirationHops()

Hi,
I have a multipage form spanned across multiple controllers' actions. I'm using an instance of Zend_Session_Namespace to carry data
from each step to the other, but since I need this namespace to be unique (in order to allow multiple instances of the same form),
each namespace is named like: somename_ + the current timestamp.

My need is to make the namespace expire when the user calls an action outside this controller which handles the form.
I'm trying something like this:

PHP Code:
protected function getSession($ts)
{
   if (!
$this->_session) {
      
$this->_session = new Zend_Session_Namespace('something_'$ts);
      
$this->_session->setExpirationHops(2);
   }
   return 
$this->_session;

I thought that if I call the Zend_Session_Namespace::setExpirationHops() everytime I call the getSession() method in the controller, it would
increase the expiration hops number, but this didn't work as expected as the ExpirationHops number is set only at the first step and the namespace
expires after the third step.

Q: What am I doing wrong?
Q: Maybe I need to unset the namespace and recreate it in order to make another call to Zend_Session_Namespace::setExpirationHops() ?

Sorry for any misspellings
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:17 AM.