public function save(App_Model_AtmNetwork $tbl) { $data = array('accepting_countries' => $tbl->getAcceptingCountries(), 'name' => $tbl->getName(), 'id' => $tbl->getId()); if (null === ($id = $tbl->getId())) { unset($data['id']); $this->getDbTable()->insert($data); } else { $this->getDbTable()->update($data, array('id = ?' => $id)); } }