Skip to content

Instantly share code, notes, and snippets.

@awartoft
Created July 15, 2012 18:21
Show Gist options
  • Save awartoft/3118036 to your computer and use it in GitHub Desktop.
Save awartoft/3118036 to your computer and use it in GitHub Desktop.
public function setServiceManager(ServiceManager $serviceManager)
{
$this->get('user')
->setHydrator($serviceManager->get('entityHydrator'));
$filter = $this->getInputFilter();
// We need to add a few filters
$email = $filter->get('user')
->get('email');
$cb = new \Zend\Validator\Callback(array('callback' => function() {}));
ob_clean();
var_dump($email->getValidatorChain()->addValidator($cb));
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment