View Single Post
  #9 (permalink)  
Old 08-16-2007, 06:10 AM
GeniusTse GeniusTse is offline
Junior Member
 
Join Date: Aug 2007
Posts: 10
Default Thank you for your help ~

I copied your code and tried again ~
the output of the first action: registry-in
Code:
yoyo variable index has been registered!!
array(1) { ["index"]=> string(3) "123" }

but the second action: registry-out
Code:
Fatal error: Uncaught exception 'Zend_Exception' with message 
'No entry is registered for key 'test'' in 
/opt/lampp/lib/Zend/Registry.php:145

It seems that, the $value can be registry within the action registry-in and get correct inside, but cannot get it back from the action 'registry-out. Do I need to make some configurations let the registry work?

Out of topic:
On the other hand, I think that, my code is works when I was new an instance of Zend_Registry and apply Zend_Registry:setInstance. It is because that, there is the only object of Zend_Registry inside the Zend_Registry when singleton was applied. Of cause the previous registered registry will be destroy after setInstance() was called, but the it should be work if I never re-setInstance() , right?? If my concept is not correct please let me know because I am just a newbie in PHP and Zend framework ~
Reply With Quote