public function dispatch($event, Event $eventObject)
    {
        if (!isset($this->listeners[$event])) {
            return;
        }
        
        foreach ($this->listeners[$event] as $listener) {
            call_user_func_array($listener, array($eventObject));
            
            if ($eventObject->propagationHalted()) {
                break;
            }
        }
    }
public function dispatch($event, Event $eventObject)
    {
        if (!isset($this->listeners[$event])) {
            return;
        }
        
        foreach ($this->listeners[$event] as $listener) {
            call_user_func_array($listener, array($eventObject));
            
            if ($eventObject->propagationHalted()) {
                break;
            }
        }
    }
public function dispatch ( $ event , Event $ eventObject ) { if ( ! isset ( $ this -> listeners [ $ event ] ) ) { return ; } foreach ( $ this -> listeners [ $ event ] as $ listener ) { call_user_func_array ( $ listener , array ( $ eventObject ) ) ; if ( $ eventObject -> propagationHalted ( ) ) { break ; } } }
Dispatches an event to all listeners.

@param string $event
@param \BedRest\Events\Event $eventObject
Dispatches an event to all listeners .