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);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Zend_Registryis 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
idin registry? In theBootstrap?init? Make sure it’s called in your application flow.