Skip to content

Commit ca88e06

Browse files
committed
Fix api typo in example
1 parent 509ec15 commit ca88e06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Main extends Application // like that one in c++
4444
public function run()
4545
{
4646
$worker = $this->createWorker(MyWorker::class); // create external non-blocking thread of MyWorker class
47-
$worker->event('any_event', 'Hello my worker!');
47+
$worker->emit('any_event', 'Hello my worker!');
4848
$worker->on('hello_master', function() {
4949
// Receive back-call from child
5050
});
@@ -58,8 +58,8 @@ class MyWorker extends Application
5858
$this->on('any_event', function($data) {
5959
echo 'Got any_event event from my master: ' . $data; // data == Hello my worker
6060
// Still we can send any event back to master
61-
$this->event('hello_master');
62-
$this->event('send-any-data', new Data()); // you can send any object, array or scalar
61+
$this->emit('hello_master');
62+
$this->emit('send-any-data', new Data()); // you can send any object, array or scalar
6363
// object should have jms serializer metadata to be serialized
6464
});
6565
}

0 commit comments

Comments
 (0)