Nextcloud PHP API (master)

INotifyHandler

Provides access to detected changes in the storage by either actively listening or getting the list of changes that happened in the background

Tags
since
12.0.0

Table of Contents

Methods

getChanges()  : array<string|int, IChange>
Get all changes detected since the start of the notify process or the last call to getChanges
listen()  : mixed
Start listening for update notifications
stop()  : mixed
Stop listening for changes

Methods

getChanges()

Get all changes detected since the start of the notify process or the last call to getChanges

public getChanges() : array<string|int, IChange>
Tags
since
12.0.0
Return values
array<string|int, IChange>

listen()

Start listening for update notifications

public listen(callable $callback) : mixed

The provided callback will be called for every incoming notification with the following parameters

  • IChange|IRenameChange $change

Note that this call is blocking and will not exit on it's own, to stop listening for notifications return false from the callback

Parameters
$callback : callable
Tags
since
12.0.0

stop()

Stop listening for changes

public stop() : mixed

Note that any pending changes will be discarded

Tags
since
12.0.0

        
On this page

Search results