int wb_set_handler (int window, mixed fn_handler)
Assigns the callback function fn_handler to window. The handler function may be a regular PHP function or class method that is used to process events for this particular window. wb_set_handler() must be called whenever the window needs to process messages and events from its controls.
To specify a function as the handler, pass the function name in fn_handler. If the handler is a class method, fn_handler must be an array which first element is the name of the object and the second one is the method name.
For additional information, see callback functions and window handlers.
Callback functions and window handlers
Window messages and events