Code: Select all
getGroupListHelper()
getGroupListObject()
getGroupListModel() // Perhaps the best choice? Unless you have a cooler name <!-- s:P --><img src=\"{SMILIES_PATH}/icon_razz.gif\" alt=\":P\" title=\"Razz\" /><!-- s:P -->
One is for holding records and the other table is for group associations which record can have. It's a one to many relationship, where one record can have multiple groups.
The models map these two tables and the association model is never to be used independently but strictly through the main objects API.
If you want to add a group to a specifc record you would access the secondary object with something like:
Code: Select all
$model = new Main_Model();
$model->getSecondaryModel()->createGroup($name);What or how would you define this secondary object according to pattern terminology? I personally wouldn't consider it a helper object as helpers I tend to think of as generic objects which are more reusable as opposed to being bound to a specific model through composition.
The secondary model is always used as a composite in the primary and it's access is restricted to accessors/mutators.
I Googled broker quickly as it seemed to make sense however (according to M$) it's more for distributed systems, which this is not nessecarily so.
Perhaps an association object?
Cheers,
Alex