コード例 #1
0
ファイル: Category.php プロジェクト: shahmaulik/zfcore
 /**
  * Add child
  *
  * @param Core_Categories_Row $row
  * @throws Zend_Db_Table_Row_Exception
  * @return Categories_Model_Category
  */
 public function addChild(Core_Categories_Row $row)
 {
     if (!$this->_children) {
         $data = array('table' => $this->getTable(), 'data' => array(), 'readOnly' => false, 'rowClass' => __CLASS__, 'stored' => true);
         $rowsetClass = $this->getTable()->getRowsetClass();
         $this->_children = new $rowsetClass($data);
     }
     parent::addChild($row);
     return $this;
 }