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