-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
New hook system #3266
New hook system #3266
Conversation
* @param string $method optional | ||
* @param callable $callback optional | ||
*/ | ||
public function remoteListener($scope = null, $method = null, $callback = null) { |
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.
Your gist says removeListener for this function.
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.
oops, typo
Do you want to move the old class into legacy in this pull request as well? |
👍 All tests passed. |
🍻 for unit tests |
@icewind1991 are you planing to push your gist to the dev docs? |
👍 |
New hook system that allows better scoping of events, main advantage is better automated tests for classes using this system compared to OC_Hooks.
Not meant to replace the existing uses of OC_Hooks, instead meant for new classes that want to provide hooks
More info: https://gist.github.com/icewind1991/1e315e6e75c106406405
Required as part of the improved filesystem api I'm planning.
cc @MTGap @Raydiation @karlitschek @DeepDiver1975