/** * @param Uuid $aggregateId * @param integer $playHead * @return boolean */ private function isValidPlayHead(Uuid $aggregateId, $playHead) { $eventDescriptors = $this->storage->find($aggregateId->getValue()); if (!empty($eventDescriptors)) { $this->current->put($aggregateId->getValue(), end($eventDescriptors)->getPlayhead()); } if ($this->current->get($aggregateId->getValue()) != $playHead && $playHead != -1) { return false; } return true; }
/** * @param string $key * @return string */ public function getClassByEventName($key) { return $this->innerMap->get($key); }