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

ClosureExpressionVisitor can not handle methods without the "get" prefix #276

Closed
gnumoksha opened this issue Jul 13, 2021 · 1 comment
Closed

Comments

@gnumoksha
Copy link

Hello. I'm wondering why there is a regular expression check here:

if (preg_match('/^is[A-Z]+/', $field) === 1 && method_exists($object, $field)) {

I've methods that do not have "get" or "is" as a prefix, and they don't work because of that regex. Right now, I'm implementing the __call method on my object, but it would be nice if ClosureExpressionVisitor is able to find the methods.

@gnumoksha gnumoksha changed the title ClosureExpressionVisitor ClosureExpressionVisitor can not handle methods without the "get" prefix Jul 13, 2021
@malarzm
Copy link
Member

malarzm commented Jul 13, 2021

This was proposed (#149) and declined before, also there's #263 still open so I'm closing this as a duplicate.

@malarzm malarzm closed this as completed Jul 13, 2021
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