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.
2 parents e1be46f + 231fc74 commit c5531a1Copy full SHA for c5531a1
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
@@ -79,11 +79,6 @@ public function getFieldVariables($key)
79
return $variables;
80
}
81
82
- public function toJson()
83
- {
84
- return json_encode($this->getFields());
85
- }
86
-
87
public function getFields()
88
{
89
return $this->fields;
0 commit comments