/**
  * @param Connection $connection
  * @param string $table
  * @param ActionEventDispatcher $eventDispatcher
  * @param ActionEventListenerAggregate[] $listeners
  */
 public function __construct(Connection $connection, $table, ActionEventDispatcher $eventDispatcher = null, array $listeners = null)
 {
     $this->connection = $connection;
     $this->table = $table;
     $this->actions = $eventDispatcher;
     $this->triggerActions = !is_null($eventDispatcher);
     if ($eventDispatcher && $listeners) {
         foreach ($listeners as $listenerAggregate) {
             $this->actions->attachListenerAggregate($listenerAggregate);
         }
     }
 }