示例#1
0
 /**
  * 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;
     }
 }
示例#2
0
 /**
  * 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;
 }