src/Event/Emitter.php
public function emit($name, $eventData = array()) 
    {

        if(!is_array($eventData)) {
            throw new \Exception('Moxy\Event data must be an array');
        }

        if(isset(self::$_events[$name])) {
            self::$_events[$name]->dispatch($eventData);   
        }

    }
public function emit($name, $eventData = array()) 
    {

        if(!is_array($eventData)) {
            throw new \Exception('Moxy\Event data must be an array');
        }

        if(isset(self::$_events[$name])) {
            self::$_events[$name]->dispatch($eventData);   
        }

    }
public function emit ( $ name , $ eventData = array ( ) ) { if ( ! is_array ( $ eventData ) ) { throw new \ Exception ( 'Moxy\Event data must be an array' ) ; } if ( isset ( self :: $ _events [ $ name ] ) ) { self :: $ _events [ $ name ] -> dispatch ( $ eventData ) ; } }
Emit an Event

@author Tom Morton
@param string $name Name of the event
@param array $eventData Optional array of event data
@throws \Exception when $eventData is not an array
Emit an Event