Пример #1
0
 public static function register()
 {
     $consumer = new static();
     $consumer->when(new ConsumerWasRegistered(Consumer\Id::generate()));
     return $consumer;
 }
 public static function fromArray(array $data)
 {
     return new static(Consumer\Id::fromString($data['id']));
 }
 public static function fromArray(array $data)
 {
     return new static(Consumer\Id::fromString($data['id']), Stream\Id::fromString($data['streamId']), Privilege::fromString($data['privilege']));
 }