if you want to use the objects as in the datasource for datagrid, the objects need to implement ArrayAccess
e.g.
class Manufacturer implements ArrayAccess
or as in the PetShop example, just let the Prototype implement ArrayAccess.
CVS was updated, please allow 24 hours for the public CVS to catch up.
The new code allows something like the following
$item = new Item(); //e.g. class Item extends Prototype
echo $item->ItemID; //member variable read
echo $item['ItemID']; //same as above but using array index
echo $item->Category->Name; // dereferenced object
echo $item['Category']->Name; // as above
echo $item['Category']['Name'] //as above if Category is also a Prototype
foreach($item as $property => $value) //iterate throught all the properties
echo "$property => $value \n";
Wei.