You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love the idea of the package but the documentation isn't very clear and I have spotted a few mistakes. Is the repo on Github?
Anyway I am having some difficulty understanding how to set the listeners up correctly, so far I have this:
$emitter = newEmitter();
$emitter->addListener('NewIssueEvent', function ($event) {
echo$event->getName();
});
$emitter->emit(newNewIssueEvent);
Now what is the correct way to call my listener? is it as simple as newing one up? new NewIssueEventListener(); But this doesn't seem correct as then what is the point in the handle function?
I'd love a quick example set up of class based events and listeners. Thanks 👍
The text was updated successfully, but these errors were encountered:
@joshhornby Hi Josh, sorry for the late reply. I had already fixed this problem by working on the documentation but forgot to respond to this issue. The class based listener is places where the closure is places. So:
Hey,
I love the idea of the package but the documentation isn't very clear and I have spotted a few mistakes. Is the repo on Github?
Anyway I am having some difficulty understanding how to set the listeners up correctly, so far I have this:
Now what is the correct way to call my listener? is it as simple as newing one up?
new NewIssueEventListener();
But this doesn't seem correct as then what is the point in the handle function?I'd love a quick example set up of class based events and listeners. Thanks 👍
The text was updated successfully, but these errors were encountered: