public function save(Default_Model_Company $company) { $data = array('company_name' => $company->getCompanyName(), 'busines_type' => $company->getBusinesType(), 'tel' => $company->getTel(), 'email' => $company->getEmail(), 'address' => $company->getAddress(), 'website' => $company->getWebsite(), 'information' => $company->getInformation(), 'assign_cons' => $company->getAssignCons(), 'created_date' => $company->getCreatedDate(), 'updated_date' => $company->getUpdatedDate()); if (null == ($id = $company->getCompanyId())) { return $this->getDbTable()->insert($data); } else { unset($data['created_date']); $this->getDbTable()->update($data, array('company_id = ?' => $id)); return $id; } }