public function save(Application_Model_Category $category) { $data = array('account_id' => $category->getAccountId(), 'cate' => $category->getCategory()); if (null === ($id = $category->getId())) { $this->getDbTable()->insert($data); } else { $this->getDbTable()->update($data, array('id = ?' => $id)); } }