示例#1
0
 public function load($identifier)
 {
     $events = $this->eventStore->retrieve($identifier);
     return User::initialise($events);
 }
示例#2
0
 /**
  * @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);
 }