Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setter generation mechanism #528

Closed
BigAndini opened this issue Sep 17, 2015 · 1 comment
Closed

setter generation mechanism #528

BigAndini opened this issue Sep 17, 2015 · 1 comment

Comments

@BigAndini
Copy link

Hi,

would it be nicer to generate the setters in the hydrateByValue method of DoctrineObject with

$setter = sprintf('set%s', ucfirst(
    str_replace(' ', '', ucwords(str_replace('_', ' ', $field)))
));

instead of

$setter = 'set' . ucfirst($field);

This leads to searching for the method setMy_field when I use my_field in a doctrine entity. It should search for setMyField, I think.

@TomHAnderson
Copy link
Member

Non-default naming strategies seem to have their share of problems. For this idea I can't see it going into production. If you've got another idea you'd like to PR we can assess that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants