Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Improve code generators consistency #3378

Merged
merged 8 commits into from
Jan 14, 2013
Merged

Improve code generators consistency #3378

merged 8 commits into from
Jan 14, 2013

Conversation

neeckeloo
Copy link
Contributor

I added formArray() method in some generators for consistency.

@neeckeloo
Copy link
Contributor Author

I think it would be judicious to create a static method \Zend\Code\Generator\AbstractGenerator::fromArray() a bit like \Zend\Stdlib\AbstractOptions::setFromArray() to reduce code and for consistency of all generators. There still remains the possibility of extending this method if necessary.

@weierophinney Do you think I can refactor the code from this idea ?

@weierophinney
Copy link
Member

@neeckeloo The only issue with abstracting it is that not all of them have the same properties/methods that they operate on -- it looked like each one had a slight variation of one sort or another. As such, I think having each define their specific functionality is good here.

@weierophinney weierophinney merged commit a4c5e41 into zendframework:develop Jan 14, 2013
@ghost ghost assigned weierophinney Jan 14, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants