src/EventContext.php
public function pushEvent(string $name, $data = null) : Event
    {
        $event = new Event($name, $data);
        $this->queue->enqueue($event);
        return $event;
    }
public function pushEvent(string $name, $data = null) : Event
    {
        $event = new Event($name, $data);
        $this->queue->enqueue($event);
        return $event;
    }
public function pushEvent ( string $ name , $ data = null ) : Event { $ event = new Event ( $ name , $ data ) ; $ this -> queue -> enqueue ( $ event ) ; return $ event ; }
Add an event to event queue

@param string $name
@param mixed $data

@return Event
Add an event to event queue