public function process($data) { if ($this->isValid($data) !== true) { print_r($this->getErrorMessages()); die; throw new C3op_Form_InstitutionCreateException('Invalid data!'); } else { $db = Zend_Registry::get('db'); $institutionMapper = new C3op_Register_InstitutionMapper($db); $institution = new C3op_Register_Institution(); $institution->SetName($this->name->GetValue()); $institution->SetShortName($this->shortName->GetValue()); $institution->SetLegalEntity($this->legalEntity->GetValue()); $institution->SetRegisterNumber($this->registerNumber->GetValue()); $institution->SetStateRegistration($this->stateRegistration->GetValue()); $institution->SetLocalRegisterNumber($this->localRegisterNumber->GetValue()); $institution->SetStreet($this->street->GetValue()); $institution->SetStreetNumber($this->streetNumber->GetValue()); $institution->SetAddressComplement($this->addressComplement->GetValue()); $institution->SetDistrict($this->district->GetValue()); $institution->SetZipCode($this->zipCode->GetValue()); $institution->SetCity($this->city->GetValue()); $institution->SetState($this->state->GetValue()); $institution->SetWebsite($this->website->GetValue()); $institution->SetType($this->type->GetValue()); $institution->SetRelationshipType($this->relationshipType->GetValue()); $institutionMapper->insert($institution); } }