On Wednesday, April 27, 2011 02:51:22 AM MTTrading wrote:
> I have a puzzling issue.
> 
> I can set the Zend_Registery in the bootstrap file of the default module
> using   :   Zend_Registry::set('indexKey', 'value');
> 
> and it stays set.  I can use the  :  Zend_Registry::get('indexKey');
> 
> and get the value in the file at   :
> application/layouts/scripts/_login.phtml
> 
> However when I set a registery index using the same code as above:
> Zend_Registry::set('indexKey', 'value');
> 
> in my LoginController located at   :
> application/modules/authacl/controllers/LoginControllers.php
> 
> the Zend_Registery is not keeping the new index value when I try to use it
> in  :  application/layouts/scripts/_login.phtml  (same file as above)
> 
> I checked it in the controller by doing a
> Zend_debug::dump(Zend_Registry::getInstance()) and it is there.
> 
> From my reading the registry setting should be available anywhere in your
> application.

It sounds like you need to review your login proceedure as the value is 
probably being set again in the Bootstrap.php after the LoginController.php 
sets it. Have you tried setting it in another controller in a different 
module? Are you seeing the same thing?

Just in case: The Zend_Registry is not like session data. Zend_Registry is 
like a global variable. It will not survive requests. If you need the value to 
survive from request to request, you need to use the session.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to