public function triggerEvent($name, array $data = [])
    {
        try {
            /** @var EventInterface $event */
            $event = $this->createEventObject($name, $data);
        } catch (\InvalidArgumentException $exception) {
            return $this;
        }

        foreach ($this->options['events'][$name]['listeners'] as $eventListener) {
            if ($event->isPropagationStopped()) {
                $this->loggerInstance->makeLogEvent($name, $eventListener, self::EVENT_STATUS_BREAK);
                break;
            }

            $this->executeListener($eventListener, $event, $name);
        }

        return $this;
    }
public function triggerEvent($name, array $data = [])
    {
        try {
            /** @var EventInterface $event */
            $event = $this->createEventObject($name, $data);
        } catch (\InvalidArgumentException $exception) {
            return $this;
        }

        foreach ($this->options['events'][$name]['listeners'] as $eventListener) {
            if ($event->isPropagationStopped()) {
                $this->loggerInstance->makeLogEvent($name, $eventListener, self::EVENT_STATUS_BREAK);
                break;
            }

            $this->executeListener($eventListener, $event, $name);
        }

        return $this;
    }
public function triggerEvent ( $ name , array $ data = [ ] ) { try { /** @var EventInterface $event */ $ event = $ this -> createEventObject ( $ name , $ data ) ; } catch ( \ InvalidArgumentException $ exception ) { return $ this ; } foreach ( $ this -> options [ 'events' ] [ $ name ] [ 'listeners' ] as $ eventListener ) { if ( $ event -> isPropagationStopped ( ) ) { $ this -> loggerInstance -> makeLogEvent ( $ name , $ eventListener , self :: EVENT_STATUS_BREAK ) ; break ; } $ this -> executeListener ( $ eventListener , $ event , $ name ) ; } return $ this ; }
trigger new event with automatic call all subscribed listeners

@param string $name
@param array $data
@return $this
@throws \LogicException
trigger new event with automatic call all subscribed listeners