Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PropertyAccess] AccesorPrefix can, mayI ... #19542

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

Closed
alborq opened this issue Aug 5, 2016 · 8 comments
Closed

[PropertyAccess] AccesorPrefix can, mayI ... #19542

alborq opened this issue Aug 5, 2016 · 8 comments

Comments

@alborq
Copy link

alborq commented Aug 5, 2016

Hello,

Prefix of accessor is actually [get|is|has|__get] but, accessor name depend of context. we cant personalize this list ?

In my case i have :
Entity: Printer
Property Definition : printer [true|false] can print into a photo paper.
PropertyName : printOnPhotoPaper
Method : canPrintOnPhotoPaper | setPrintOnPhotoPaper

I can't use it.

@theofidry
Copy link
Contributor

@alborq it's not configurable, however you're free to register your own property access depending on the task.

@javiereguiluz
Copy link
Member

Yesterday I was talking about this exact same feature with a Symfony developer who would have need this feature in his project.

@theofidry
Copy link
Contributor

Somehow related to #19374 (comment)

@patrick-mcdougle
Copy link
Contributor

patrick-mcdougle commented Aug 7, 2016

Not sure how possible it is to rename your property, but couldn't you just rename your accessor to hasAbilityToPrintOnPhotoPaper() or isAbleToPrintOnPhotoPaper() and setter to setAbilityToPrintOnPhotoPaper() or setAbleToPrintOnPhotoPaper()?

@alborq
Copy link
Author

alborq commented Aug 7, 2016

@patrick-mcdougle sure i can, but you know like me, it's complex to find a good name of all properties, and in this case, we can find other good name like your exemple, but i thinks in specific case, link with job specification, we cant change name.

I'm not locked with this issue, i just thinks, it can be a problem. (like migrate legacy)

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@carsonbot
Copy link

Just a quick reminder to make a comment on this. If I don't hear anything I'll close this.

@carsonbot
Copy link

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

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

No branches or pull requests

5 participants