-
Notifications
You must be signed in to change notification settings - Fork 46
Allow for a candidate to have a Closure as a class parameter #66
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
Conversation
squash and merge? |
I rebased the PR and added FYI. I do not want the ClassDiscovery to instantiate the class because the |
thanks! |
Thank you for merging. |
/** | ||
* Get an instance of the $class. | ||
* | ||
* @param string|\Closure $class A FQN of a class or a closure that instantiate the class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FQCN
Added a few comments. Nice work. 👍 |
This PR will allow you to return a closure as a class parameter on the candidate. The good thing about this is that someone can write their own strategy that emulates a async client. An example of such strategy is seen in #65.
This will increase the extendibility in the discovery mechanism.