public function addListenerForEvent($eventClassName, $listener)
    {
        if (FALSE === array_key_exists($eventClassName, $this->eventMap))
        {
            $this->eventMap[$eventClassName] = [];
        }
        $this->eventMap[$eventClassName][] = $listener;
    }
public function addListenerForEvent($eventClassName, $listener)
    {
        if (FALSE === array_key_exists($eventClassName, $this->eventMap))
        {
            $this->eventMap[$eventClassName] = [];
        }
        $this->eventMap[$eventClassName][] = $listener;
    }
public function addListenerForEvent ( $ eventClassName , $ listener ) { if ( FALSE === array_key_exists ( $ eventClassName , $ this -> eventMap ) ) { $ this -> eventMap [ $ eventClassName ] = [ ] ; } $ this -> eventMap [ $ eventClassName ] [ ] = $ listener ; }
Adds a new listener for an event.

@param string   $eventClassName The event class name.
@param callable $listener       Any kind of callable.
@return void
Adds a new listener for an event .