You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Watchers now pass the watcher object to the callback function when an event occurs. The watcher object is passed as the last function argument (in the case of timers and immediates, the only argument).
All watchers now include setData() and getData() methods for setting and getting data associated with the watcher. Functions creating watchers have an optional $data parameter that can be used to set the data associated with a watcher when it is created.
The functions creating timers and immediates no longer accept a variadic list of arguments to pass to the callback invoked by the timer or immediate. Instead the timer or immediate watcher object is passed to the callback. Use getData() and setData() on the watcher for passing data to the callback.