Issues

ZF2-417: Zend\Form\Annotation\Hydrator doesn't allow to set underscoreSeparatedKeys

Issue Type: Bug Created: 2012-07-23T11:11:47.000+0000 Last Updated: 2012-10-08T20:15:06.000+0000 Status: Closed Fix version(s): Reporter: David Reyes Samblas Martinez (dsamblas) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Form

  • ClassMethods
  • annotation
  • form
  • hydrator
  • underscoreSeparatedKeys

Related issues: Attachments:

Description

the Hydrator ClassMethods has a property only accesible though __construct underscoreSeparatedKeys, but there is no way to define this value though Form notation, or change it later on in the controller though any setter due the HydratorInterface doesn't has it defined.

Suggestion1: Change the Hydrator notation from AbstractStringAnnotation to AbstractArrayAnnotation and be something like this: @Zend\Form\Annotation\Hydrator({"class":"Zend\Stdlib\Hydrator\ClassMethods", "underscoreSeparatedKeys":false}) The rest of the Hydrators can happily ignore such additional params, and in ClassMethods if not defined can use default just as is right now.

Actually I ugly patched putting default to false instead of true to make this work with my Anotation definitions.

Comments

Posted by Chris Martin (cgmartin) on 2012-09-18T04:27:25.000+0000

PR added: https://github.com/zendframework/zf2/pull/2378

Posted by Ralph Schindler (ralph) on 2012-10-08T20:15:06.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2507

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts