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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-17-2007, 12:26 PM
Junior Member
 
Join Date: Nov 2007
Posts: 4
Default Zend_Registry not saving a index.

I am adding a entry to the registry like so:

Zend_Registry::set('EditMode',1);

I am doing this in the init() method of the controller if the user has pressed an Edit button.

In my models I do:

if(Zend_Registry::isRegistered('EditMode'))
{
.... do edit stuff
}

Here is the problem: Immediately after the user presses the edit button and the flag is set in the registry, in the controller all works as expected. If however another submit is performed after EditMode has been set the Zend_Registry::isRegistered() call returns false.

How can the entry go away?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-17-2007, 03:58 PM
Member
 
Join Date: Mar 2007
Posts: 41
Default

Hi, I'm not sure I understand you right, but Zend_Registry is something instead global variables, not to save persistent data (e.g. between two requests). Check Zend_Session
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 09:29 PM.