on()
on(string $triggerName, callable $callback)
Sets a function to be called when a certain trigger is fired
Parameters
string |
$triggerName |
trigger that the function is called on |
callable |
$callback |
function to be called. Must return true for
is_callable |