/** * Populate Row FromEntry * * @param Postr_Model_Entry $entry * @param Zend_Db_Table_Row_Abstract $entryRow * @return Zend_Db_Table_Row_Abstract */ protected function _populateRowFromEntry(Postr_Model_Entry $entry, Zend_Db_Table_Row_Abstract $entryRow = null) { if (null === $entryRow) { $entryRow = $this->_entryTable->createRow(); } $entryRow->id = $entry->getId(); $entryRow->title = $entry->getTitle(); $entryRow->content = $entry->getContent(); $entryRow->summary = $entry->getSummary(); $entryRow->updated = $entry->getUpdated()->get(Zend_Date::ISO_8601); $entryRow->published = $entry->getPublished()->get(Zend_Date::ISO_8601); return $entryRow; }
public function __construct($id = false) { $this->table = new $this->tableClassName; if ($id) { $this->loadRow($id); } else { $this->row = $this->table->createRow(); } }