Add INotifyHandler to make notify more flexible

This commit is contained in:
Robin Appelman 2016-12-08 15:18:24 +01:00
commit 8c937d6126
8 changed files with 277 additions and 20 deletions

View file

@ -290,14 +290,13 @@ class NativeShare extends AbstractShare {
/**
* @param string $path
* @param callable $callback callable which will be called for each received change
* @return mixed
* @return INotifyHandler
*/
public function notify($path, callable $callback) {
public function notify($path) {
// php-smbclient does support notify (https://github.com/eduardok/libsmbclient-php/issues/29)
// so we use the smbclient based backend for this
$share = new Share($this->server, $this->getName());
$share->notify($path, $callback);
return $share->notify($path);
}
public function __destruct() {