public static function dispatch($eventName, Event $event)
    {
        if (null === self::$dispatcher) {
            return $event;
        }

        self::$dispatcher->dispatch($eventName, $event);
        DataLogger::log(sprintf('The "%s" event was dispatched', $eventName));
        if ($event->getAbort()) {
            DataLogger::log(sprintf('The "%s" event was aborted', $eventName), DataLogger::ERROR);

            throw new EventAbortedException($event->getAbortMessage());
        }

        return $event;
    }
public static function dispatch($eventName, Event $event)
    {
        if (null === self::$dispatcher) {
            return $event;
        }

        self::$dispatcher->dispatch($eventName, $event);
        DataLogger::log(sprintf('The "%s" event was dispatched', $eventName));
        if ($event->getAbort()) {
            DataLogger::log(sprintf('The "%s" event was aborted', $eventName), DataLogger::ERROR);

            throw new EventAbortedException($event->getAbortMessage());
        }

        return $event;
    }
public static function dispatch ( $ eventName , Event $ event ) { if ( null === self :: $ dispatcher ) { return $ event ; } self :: $ dispatcher -> dispatch ( $ eventName , $ event ) ; DataLogger :: log ( sprintf ( 'The "%s" event was dispatched' , $ eventName ) ) ; if ( $ event -> getAbort ( ) ) { DataLogger :: log ( sprintf ( 'The "%s" event was aborted' , $ eventName ) , DataLogger :: ERROR ) ; throw new EventAbortedException ( $ event -> getAbortMessage ( ) ) ; } return $ event ; }
Dispatches the event

@param       $eventName
@param Event $event
@return Event
Dispatches the event