/** * addModel * * @param bikes_Model_Abstract $model * @access public * @return void */ public function addModel(bikes_Model_Abstract $model) { if (empty($this->master)) { if ($model->hasCollection()) { $this->collections['master'] = $model->getCollection(); } $this->master = $model; } else { if ($model->hasCollection()) { $this->collections['slave'] = $model->getCollection(); } $this->slave = $model; } }
/** * Loads the right meta data for the master model * * @access public * @return void */ public function fetchMasterMeta() { $ids = $this->collections['master']->getIds(); $collection = $this->slave->loadIn($this->getMasterColumn(), $ids); $this->collections['slave'] = $collection; }