Created
May 19, 2015 21:08
-
-
Save matej21/632139f8e043cce0c692 to your computer and use it in GitHub Desktop.
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
<?php | |
class MyFormFactory | |
{ | |
public function create(BusinessCard $card) | |
{ | |
$form = new Form; | |
$form->addText(...); | |
$form->onSuccess[] = function ($form) use ($card) { | |
$this->processForm($form, $card); | |
} | |
return $form; | |
} | |
private function processForm($form, $card) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment