public function load($identifier) { $events = $this->eventStore->retrieve($identifier); return User::initialise($events); }
/** * @param string $entityIdentifier * * @return mixed */ public function load($entityIdentifier) { $this->enforceTypeConstraint($this->eventStore->entityClass($entityIdentifier)); $events = $this->eventStore->retrieve($entityIdentifier); return call_user_func(array($this->entityClass, 'initialise'), $events); }