View Single Post
  #1 (permalink)  
Old 08-06-2007, 08:21 PM
Elemental's Avatar
Elemental Elemental is offline
Senior Member
 
Join Date: Jul 2007
Posts: 122
Default Zend_Regitry and Arrays?

Interesting problem I can't seem to figure out.

I'm using Zend_Registry to store several Zend_Db_Table objects and a Zend_Config_Ini object. I set the Config_Ini object, a few dbAdapter objects and some of the table object in the bootstrap. To get any of these back I just have to call Zend_Registry::get('foo'); no problemo.

However, when I try to set a standard array things seem to break. The following code is not the exact code, just a mock up.

function setAction() {
$testArray = array(
'1' => 0,
'2' => 2,
'3' => 4,
etc....
);
Zend_Registry::set('testArray', $testArray);
}

function getAction() {
$testArray = Zend_Registry::get('testArray');
}

this keeps telling me that there is nothing in the registry with the key 'testArray'?
Reply With Quote