Created
October 19, 2012 19:30
-
-
Save michael-romer/3920196 to your computer and use it in GitHub Desktop.
Listing 16.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function indexAction() | |
{ | |
$form = new \Helloworld\Form\SignUp(); | |
if ($this->getRequest()->isPost()) { | |
$form->setData($this->getRequest()->getPost()); | |
if ($form->isValid()) { | |
var_dump($form->getData()); | |
} else { | |
return new ViewModel( | |
array( | |
'form' => $form | |
) | |
); | |
} | |
} else { | |
return new ViewModel( | |
array( | |
'form' => $form | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment