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

How do you remove listeners? #104

Open
frugan-dev opened this issue Jan 2, 2023 · 0 comments
Open

How do you remove listeners? #104

frugan-dev opened this issue Jan 2, 2023 · 0 comments

Comments

@frugan-dev
Copy link

In version 2 there were these methods to remove listeners:

$emitter->removeListener($event, $listener);
$emitter->removeAllListeners($event);

How to do it in version 3?

Here we mention the matter, but always with reference to version 2.

It seems that other similar libraries have these methods:

https://github.com/symfony/event-dispatcher/blob/6.2/EventDispatcher.php#L132
https://github.com/laminas/laminas-eventmanager/blob/3.10.x/src/EventManager.php#L202
https://github.com/laminas/laminas-eventmanager/blob/3.10.x/src/EventManager.php#L250

Thanks!

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

1 participant