I have an array that I cache, which was returned from a database model that extends zend_db_Table_abstract. I use ->toArray() on the object. When retrieving the data I would like to convert it back to that model.
I tried doing the following
$modules = new Zend_Db_Table_Rowset(array('data' => $modules, 'table' => 'modules', 'rowClass' => 'Model_Db_Module'));
now when I iterate.
foreach ($modules as $module)
echo $module->name;
I get nothing! If I remove 'rowClass' => 'Model_Db_Module'. It returns the correct value. How can I go by returning the correct object so that i can manipulate the data if I need to? If i needed to use
$module->name = "Cool Stuff";
$module->save();