Ejemplo n.º 1
0
 /**
  * (non-PHPdoc)
  * @see    texdc\momento\EventStoreInterface::findAllBetween()
  * @throws texdc\momento\exception\InvalidEventTypeException
  */
 public function findAllBetween(EventId $aLowEventId, EventId $aHighEventId)
 {
     $this->guardEventType($aLowEventId->eventType());
     $this->guardEventType($aHighEventId->eventType());
     return array_filter($this->events, function (EventInterface $anEvent) use($aLowEventId, $aHighEventId) {
         $id = $anEvent->eventId();
         return $aLowEventId->occurredBefore($id) && $aHighEventId->occurredAfter($id);
     });
 }