3
3
4
4
namespace Litipk \JupyterPHP \Actions ;
5
5
6
-
7
6
use Litipk \JupyterPHP \JupyterBroker ;
8
7
use React \ZMQ \SocketWrapper ;
9
8
10
-
11
9
final class KernelInfoAction implements Action
12
10
{
13
11
/** @var JupyterBroker */
@@ -34,30 +32,28 @@ public function __construct(JupyterBroker $broker, SocketWrapper $shellSocket, S
34
32
35
33
public function call (array $ header , array $ content , $ zmqId = null )
36
34
{
37
- // TODO: Implement call() method.
35
+ $ this -> broker -> send ( $ this -> iopubSocket , ' status ' , [ ' execution_state ' => ' busy ' ], $ header );
38
36
39
- $ this ->broker ->send (
40
- $ this ->iopubSocket , 'status ' , ['execution_state ' => 'busy ' ], $ header
41
- );
42
-
43
37
$ this ->broker ->send (
44
38
$ this ->shellSocket ,
45
39
'kernel_info_reply ' ,
46
40
[
47
- 'protocol_version ' => '5.0.0 ' ,
41
+ 'protocol_version ' => '5.0 ' ,
48
42
'implementation ' => 'jupyter-php ' ,
49
43
'implementation_version ' => '0.1.0 ' ,
50
44
'banner ' => 'Jupyter-PHP Kernel ' ,
51
- 'language ' => 'PHP ' ,
52
- 'language_version ' => phpversion (),
53
45
'language_info ' => [
54
46
'name ' => 'PHP ' ,
55
47
'version ' => phpversion (),
56
48
'mimetype ' => 'text/x-php ' ,
57
49
'file_extension ' => '.php ' ,
58
- 'pygments_lexer ' => 'PHP '
59
- ]
60
- ]
50
+ 'pygments_lexer ' => 'PHP ' ,
51
+ ],
52
+ 'status ' => 'ok ' ,
53
+ ],
54
+ $ header ,
55
+ [],
56
+ $ zmqId
61
57
);
62
58
63
59
$ this ->broker ->send ($ this ->iopubSocket , 'status ' , ['execution_state ' => 'idle ' ], $ header );
0 commit comments