File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments