Ejemplo n.º 1
0
 public function process($data)
 {
     if ($this->isValid($data) !== true) {
         throw new C3op_Form_ContactCreateException('Invalid data!');
     } else {
         $db = Zend_Registry::get('db');
         $contactMapper = new C3op_Register_ContactMapper($db);
         $contact = new C3op_Register_Contact();
         $contact->SetName($this->name->GetValue());
         $contact->SetType($this->type->GetValue());
         $contactMapper->insert($contact);
     }
 }