public function addAction()
 {
     $form = new User();
     $request = $this->getRequest();
     if ($request->isPost()) {
         $entity = new Profile();
         $form->setInputFilter($entity->getInputFilter());
         $form->setData($request->getPost());
         if ($form->isValid()) {
             $entity->exchangeArray($form->getData());
             $table = $this->getProfileTable()->save($entity);
             return $this->redirect()->toRoute('profile');
         }
     }
     return new ViewModel(array('form' => $form));
 }
 /**
  * {@inheritDoc}
  */
 public function setFromArray($data)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFromArray', array($data));
     return parent::setFromArray($data);
 }