int connect(string signal, callback callback [, mixed userparam]);

Connects a signal to the given callback method. For the exact parameters see the docs of the respective signal in the class documentation.

The method returns a signal handler id that can be used to block() or disconnect() the handler.

For more information about signals, see the Signal Handling tutorial

See also: connect_after() , connect_simple() , connect_simple_after() ,