Created
May 21, 2014 13:17
-
-
Save bakura10/6b9c4e8d89b518375140 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
class UserInputFilterFactory implements FactoryInterface | |
{ | |
public function createService(ServiceLocatorInterface $service) | |
{ | |
$factory = // Get from SL; | |
$inputCollection = new InputCollection('user'); | |
$input = $factory->createInput([ | |
'name' => 'foo', | |
'validators' => [] | |
]); | |
$inputCollection->addInput($input); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all, let me reiterate my hatred for the term
InputFilter
. :)Any component that allows adding other components should have a factory injected in the constructor.
then…