File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use Clue \Redis \Protocol \ErrorReplyException ;
4
-
3
+ use Clue \Redis \Protocol \Model \ErrorReply ;
5
4
use Clue \Redis \React \Client ;
6
5
use Clue \Redis \React \Factory ;
6
+ use Clue \Redis \Protocol \Model \ModelInterface ;
7
7
8
8
require __DIR__ . '/../vendor/autoload.php ' ;
9
9
18
18
$ factory ->createClient ()->then (function (Client $ client ) use ($ loop ) {
19
19
echo '# connected! Entering interactive mode, hit CTRL-D to quit ' . PHP_EOL ;
20
20
21
- $ client ->on ('message ' , function ($ data ) {
22
- if ($ data instanceof ErrorReplyException ) {
21
+ $ client ->on ('message ' , function (ModelInterface $ data ) {
22
+ if ($ data instanceof ErrorReply ) {
23
23
echo '# error reply: ' . $ data ->getMessage () . PHP_EOL ;
24
24
} else {
25
- echo '# reply: ' . json_encode ($ data ) . PHP_EOL ;
25
+ echo '# reply: ' . json_encode ($ data-> getValueNative () ) . PHP_EOL ;
26
26
}
27
27
});
28
28
You can’t perform that action at this time.
0 commit comments