-
Notifications
You must be signed in to change notification settings - Fork 17
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
Extend ConfigurationGenerator to also deal with protected methods. #10
Comments
@skoop: Here are some more insights for you to get started easily ;) Have a look at the \bitExpert\Disco\Proxy\Configuration\ConfigurationGenerator class. We grab the public methods like this: $methods = $originalClass->getMethods(ReflectionMethod::IS_PUBLIC); Either do the call a second time to grab the procteced methods or maybe the parameter is a bit field. Not sure. Also not sure if it is necessary to extend the BeanMethod::generateMethod method because protected methods should also be marked as protected in the generated proxy class. It "should" work out-of-the-box I assume, but I might be wrong ;) |
…, courtesy of Stephan
#10: Not just fetch public methods but also fetch protected methods
…thods (aka internal dependencies).
Fixes #10. has() will no longer return true for protected methods
Extend ConfigurationGenerator to also deal with protected methods. Protected methods could be used as "internal" dependencies which cannot retrieved externally by calling the get() method on the BeanFactory but can be used as dependencies for other instances. For example I do not want to expose my database connection object to the public but use it as an internal dependency.
Currently is this already possible but all annotations get ignored as no wrapper methods get generated in the proxy class.
The text was updated successfully, but these errors were encountered: