This method is the opposite of Event::on.
public static off ( string $class, string $name, callable $handler = null ) : boolean | ||
$class | string | the fully qualified class name from which the event handler needs to be detached. |
$name | string | the event name. |
$handler | callable | the event handler to be removed. If it is `null`, all handlers attached to the named event will be removed. |
Результат | boolean | whether a handler is found and detached. |