Can I use zend Registry to save variable to use in other controller? this is my code that don't work in another controller:
Zend_Registry::set('id', $Id);
Can I use zend Registry to save variable to use in other controller? this is my code that don't work in another controller:
Zend_Registry::set('id', $Id);
Zend_Registry
is an alternative to the old school $GLOBALS
. It's a container, you put stuff in there, and will retrieve them later on.
Where do you put id
in registry? In the Bootstrap
? init
? Make sure it's called in your application flow.