ZF-4141: Zend_View_Helper_PartialLoop forces objects to array conversion when object exposes toArray()
Description
I would like to use the ability exposed in the partialLoop helper to access a Zend_Db_Table_Rowset_Abstract as an object.
Unfortunately, if an object exposes toArray() as one of it's method (which is the case here for Zend_Db_Table_Rowset_Abstract) , then it is automatically converted to an array, instead of offering the possibility to use it as an object instance.
Sample code:
$this->partialLoop()->setObjectKey('object');
echo $this->partialLoop('my_partial_view',$rowset_data);
Make sure that $rowset_data is of type Zend_Db_Table_Rowset_Abstract
Comments
Posted by Jon Whitcraft (sidhighwind) on 2008-10-08T19:11:11.000+0000
I just tested this against svn and it works just fine.
Have you tried using 1.6.1 to see if this problem is fixed.
My Test Table Object
Here is what I have in my controller file
Here is what I have in my view:
here is what is in my _pl.phtml file
Posted by Jon Whitcraft (sidhighwind) on 2008-10-09T10:39:09.000+0000
This was fixed here: [http://framework.zend.com/code/changelog/…]