public function on(string $event, $handler)
    {
        if (self::isSupportedEvent($event)) {
            $this->options[$event] = $handler;
        }
    }
public function on(string $event, $handler)
    {
        if (self::isSupportedEvent($event)) {
            $this->options[$event] = $handler;
        }
    }
public function on ( string $ event , $ handler ) { if ( self :: isSupportedEvent ( $ event ) ) { $ this -> options [ $ event ] = $ handler ; } }
Defines callback on happen event
@param $event
@param callable $handler
Defines callback on happen event