@@ -191,18 +191,19 @@ private function packProtocolVersions(): string
191191 * @param string $name
192192 * @param string $user
193193 * @param string $password
194+ * @param array $extra
194195 * @return bool
195196 * @throws Exception
196197 */
197- public function init (string $ name , string $ user , string $ password ): bool
198+ public function init (string $ name , string $ user , string $ password, array $ extra = [] ): bool
198199 {
199200 if (!$ this ->handshake ())
200201 return false ;
201202
202203 if (self ::$ debug )
203204 echo 'INIT ' ;
204205
205- return $ this ->protocol ->init ($ name , Bolt::$ scheme , $ user , $ password );
206+ return $ this ->protocol ->init ($ name , Bolt::$ scheme , $ user , $ password, $ extra );
206207 }
207208
208209 /**
@@ -212,12 +213,13 @@ public function init(string $name, string $user, string $password): bool
212213 * @param string $name
213214 * @param string $user
214215 * @param string $password
216+ * @param array $extra
215217 * @return bool
216218 * @throws Exception
217219 */
218- public function hello (string $ name , string $ user , string $ password ): bool
220+ public function hello (string $ name , string $ user , string $ password, array $ extra = [] ): bool
219221 {
220- return $ this ->init ($ name , $ user , $ password );
222+ return $ this ->init ($ name , $ user , $ password, $ extra );
221223 }
222224
223225 /**
@@ -237,47 +239,51 @@ public function run(string $statement, array $parameters = [], array $extra = []
237239 /**
238240 * Send PULL_ALL message
239241 * @version <4
242+ * @param array $extra
240243 * @return mixed Array of records or false on error. Last array element is success message.
241244 */
242- public function pullAll ()
245+ public function pullAll (array $ extra = [] )
243246 {
244247 if (self ::$ debug )
245248 echo 'PULL ' ;
246- return $ this ->protocol ->pullAll ();
249+ return $ this ->protocol ->pullAll ($ extra );
247250 }
248251
249252 /**
250253 * Send PULL message
251254 * @version >=4
252255 * @internal PULL_ALL alias
256+ * @param array $extra
253257 * @return mixed Array of records or false on error. Last array element is success message.
254258 */
255- public function pull ()
259+ public function pull (array $ extra = [] )
256260 {
257- return $ this ->pullAll ();
261+ return $ this ->pullAll ($ extra );
258262 }
259263
260264 /**
261265 * Send DISCARD_ALL message
262266 * @version <4
267+ * @param array $extra
263268 * @return bool
264269 */
265- public function discardAll ()
270+ public function discardAll (array $ extra = [] )
266271 {
267272 if (self ::$ debug )
268273 echo 'DISCARD ' ;
269- return $ this ->protocol ->discardAll ();
274+ return $ this ->protocol ->discardAll ($ extra );
270275 }
271276
272277 /**
273278 * Send DISCARD message
274279 * @version >=4
275280 * @internal DISCARD_ALL alias
281+ * @param array $extra
276282 * @return bool
277283 */
278- public function discard (): bool
284+ public function discard (array $ extra = [] ): bool
279285 {
280- return $ this ->discardAll ();
286+ return $ this ->discardAll ($ extra );
281287 }
282288
283289 /**
0 commit comments