mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
Add INotifyHandler to make notify more flexible
This commit is contained in:
parent
1bf43bf0a3
commit
8c937d6126
8 changed files with 277 additions and 20 deletions
|
|
@ -38,7 +38,7 @@ class Connection extends RawConnection {
|
|||
* get all unprocessed output from smbclient until the next prompt
|
||||
*
|
||||
* @param callable $callback (optional) callback to call for every line read
|
||||
* @return string
|
||||
* @return string[]
|
||||
* @throws AuthenticationException
|
||||
* @throws ConnectException
|
||||
* @throws ConnectionException
|
||||
|
|
@ -62,6 +62,7 @@ class Connection extends RawConnection {
|
|||
$result = $callback($line);
|
||||
if ($result === false) { // allow the callback to close the connection for infinite running commands
|
||||
$this->close(true);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$output[] .= $line;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue