File tree Expand file tree Collapse file tree 9 files changed +39
-3
lines changed Expand file tree Collapse file tree 9 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 1616 */
1717abstract class AProtocol
1818{
19-
2019 protected const SUCCESS = 0x70 ;
2120 protected const FAILURE = 0x7F ;
2221 protected const IGNORED = 0x7E ;
@@ -87,4 +86,10 @@ protected function read(?int &$signature)
8786 return $ output ;
8887 }
8988
89+ /**
90+ * Returns the bolt protocol version as a string.
91+ *
92+ * @return string
93+ */
94+ abstract public function getVersion (): string ;
9095}
Original file line number Diff line number Diff line change @@ -176,4 +176,8 @@ public function reset(): array
176176 return $ message ;
177177 }
178178
179+ public function getVersion (): string
180+ {
181+ return '1 ' ;
182+ }
179183}
Original file line number Diff line number Diff line change 1212 */
1313class V2 extends V1
1414{
15-
15+ public function getVersion (): string
16+ {
17+ return '2 ' ;
18+ }
1619}
Original file line number Diff line number Diff line change @@ -177,4 +177,8 @@ public function goodbye()
177177 $ this ->connection ->disconnect ();
178178 }
179179
180+ public function getVersion (): string
181+ {
182+ return '3 ' ;
183+ }
180184}
Original file line number Diff line number Diff line change @@ -101,4 +101,8 @@ public function discard(...$args): array
101101 return $ message ;
102102 }
103103
104+ public function getVersion (): string
105+ {
106+ return '4.0 ' ;
107+ }
104108}
Original file line number Diff line number Diff line change @@ -26,4 +26,8 @@ public function hello(...$args): array
2626 return parent ::hello (...$ args );
2727 }
2828
29+ public function getVersion (): string
30+ {
31+ return '4.1 ' ;
32+ }
2933}
Original file line number Diff line number Diff line change 1212 */
1313class V4_2 extends V4_1
1414{
15-
15+ public function getVersion (): string
16+ {
17+ return '4.2 ' ;
18+ }
1619}
Original file line number Diff line number Diff line change @@ -46,4 +46,9 @@ public function route(...$args): array
4646
4747 return $ message ;
4848 }
49+
50+ public function getVersion (): string
51+ {
52+ return '4.3 ' ;
53+ }
4954}
Original file line number Diff line number Diff line change @@ -22,4 +22,8 @@ public function route(...$args): array
2222 return parent ::route (...$ args );
2323 }
2424
25+ public function getVersion (): string
26+ {
27+ return '4.4 ' ;
28+ }
2529}
You can’t perform that action at this time.
0 commit comments