Basically, the \ Zend_Registry area is in the current request, so you need to use Zend_Session for it.
if (Zend_Session::namespaceIsset('globalvars')) {
$globalSess = Zend_Session::namespaceGet('globalvars');
} else {
$globalSess = new Zend_Session_Namespace('globalvars');
}
if (isset($globalSess->yourkey)) {
echo 'Yes its is already there';
} else {
echo 'No it was not but setting it now';
$globalSess->yourkey = 'Your Value';
}
source
share