Beispiel #1
0
 /**
  * Associates a clone of this event with the given stream and assigns it a new sequence number.
  *
  * @param Stream $stream
  *
  * @return Event
  */
 public function withStream(Stream $stream)
 {
     $clone = clone $this;
     $clone->stream = $stream;
     $clone->sequence = $stream->incrementHead();
     return $clone;
 }