@@ -187,6 +187,7 @@ private function packProtocolVersions(): string
187187
188188 /**
189189 * Send INIT message
190+ * @version <3
190191 * @param string $name
191192 * @param string $user
192193 * @param string $password
@@ -199,11 +200,26 @@ public function init(string $name, string $user, string $password): bool
199200 return false ;
200201
201202 if (self ::$ debug )
202- echo 'INIT/HELLO ' ;
203+ echo 'INIT ' ;
203204
204205 return $ this ->protocol ->init ($ name , Bolt::$ scheme , $ user , $ password );
205206 }
206207
208+ /**
209+ * Send HELLO message
210+ * @internal INIT alias
211+ * @version >=3
212+ * @param string $name
213+ * @param string $user
214+ * @param string $password
215+ * @return bool
216+ * @throws Exception
217+ */
218+ public function hello (string $ name , string $ user , string $ password ): bool
219+ {
220+ return $ this ->init ($ name , $ user , $ password );
221+ }
222+
207223 /**
208224 * Send RUN message
209225 * @param string $statement
@@ -220,45 +236,48 @@ public function run(string $statement, array $parameters = [], array $extra = []
220236
221237 /**
222238 * Send PULL_ALL message
223- * @internal PULL alias
224- * @return mixed
239+ * @version <4
240+ * @return mixed Array of records or false on error. Last array element is success message.
225241 */
226242 public function pullAll ()
227243 {
228- return $ this ->pull ();
244+ if (self ::$ debug )
245+ echo 'PULL ' ;
246+ return $ this ->protocol ->pullAll ();
229247 }
230248
231249 /**
232- * Send PULL / PULL_ALL message
233- * Last success message contains key "type" which describe operation: read (r), write (w), read/write (rw) or schema write (s)
250+ * Send PULL message
251+ * @version >=4
252+ * @internal PULL_ALL alias
234253 * @return mixed Array of records or false on error. Last array element is success message.
235254 */
236255 public function pull ()
237256 {
238- if (self ::$ debug )
239- echo 'PULL ' ;
240- return $ this ->protocol ->pullAll ();
257+ return $ this ->pullAll ();
241258 }
242259
243260 /**
244261 * Send DISCARD_ALL message
245- * @internal DISCARD alias
262+ * @version <4
246263 * @return bool
247264 */
248265 public function discardAll ()
249266 {
250- return $ this ->discard ();
267+ if (self ::$ debug )
268+ echo 'DISCARD ' ;
269+ return $ this ->protocol ->discardAll ();
251270 }
252271
253272 /**
254- * Send DISCARD / DISCARD_ALL message
273+ * Send DISCARD message
274+ * @version >=4
275+ * @internal DISCARD_ALL alias
255276 * @return bool
256277 */
257278 public function discard (): bool
258279 {
259- if (self ::$ debug )
260- echo 'DISCARD ' ;
261- return $ this ->protocol ->discardAll ();
280+ return $ this ->discardAll ();
262281 }
263282
264283 /**
0 commit comments