$data
$data :
Allow to iterate over an array of standard classes with 'model_class' and 'model_id' properties set.
Optional properties from the classses can also be extracted and added as properties to the model.
Suppose you have a $data array with: array( (object) array('model_class' => 'MyApp_Item', 'model_id' => 32, 'foo' => 'bingo plus'), (object) array('model_class' => 'MyApp_Bong', 'model_id' => 12, 'foo' => 'youpla'), (object) array('model_class' => 'MyApp_Item', 'model_id' => 14, 'foo' => 'bingo'), );
You can do: $set = new Pluf_Model_Set($data, array('foo' => '_Foo')); foreach ($set as $res) { echo $res; // Will be the loaded model based on the class and id. echo $res->_Foo; // will contain the value foo of the $data array. }