public function commit()
 {
     if (count($this->events)) {
         $this->eventstore->writeToStream($this->streamUri, new WritableEventCollection($this->events));
     }
     $this->resetTransaction();
 }
Ejemplo n.º 2
0
 public function push($streamUri, array $writeableEvents)
 {
     $collection = new WritableEventCollection($writeableEvents);
     $this->eventstore->writeToStream($streamUri, $collection);
 }