We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c78061 commit 231fc74Copy full SHA for 231fc74
2 files changed
example/events.php
@@ -25,7 +25,7 @@ function (Client $client) use ($loop) {
25
});
26
27
$client->on('event', function (Event $event) {
28
- echo 'Event: ' . $event->getName() . ': ' . $event->toJson() . PHP_EOL;
+ echo 'Event: ' . $event->getName() . ': ' . json_encode($event->getFields()) . PHP_EOL;
29
30
},
31
function (Exception $error) {
src/Protocol/Message.php
@@ -24,11 +24,6 @@ public function getField($key)
24
return null;
}
- public function toJson()
- {
- return json_encode($this->getFields());
- }
-
32
public function getFields()
33
{
34
return $this->fields;
0 commit comments