public function on($event, \Closure $callback): void
    {
        // check if event is a single string and parse it to array single item
        if (!Any::isArray($event)) {
            $event = [$event];
        }
        
        foreach ($event as $item) {
            $this->events[$item][] = $callback;
        }
    }
public function on($event, \Closure $callback): void
    {
        // check if event is a single string and parse it to array single item
        if (!Any::isArray($event)) {
            $event = [$event];
        }
        
        foreach ($event as $item) {
            $this->events[$item][] = $callback;
        }
    }
public function on ( $ event , \ Closure $ callback ) : void { // check if event is a single string and parse it to array single item if ( ! Any :: isArray ( $ event ) ) { $ event = [ $ event ] ; } foreach ( $ event as $ item ) { $ this -> events [ $ item ] [ ] = $ callback ; } }
Catch the event if it occurred after this initiation of interception
@param string|array $event
@param \Closure $callback
Catch the event if it occurred after this initiation of interception