private function updateUsername(ChangedUsername $payload)
 {
     $identifier = ['userIdentifier' => $payload->userIdentifier()->toString()];
     $data = [];
     $data['username'] = $payload->newUsername()->toString();
     $data['at'] = $payload->at()->format('Y-m-d H:i:s');
     $this->connection->update($this->table, $data, $identifier);
 }
Пример #2
0
 /**
  * @param ChangedUsername $changedUsername
  */
 public function applyChangedUsername(ChangedUsername $changedUsername)
 {
     $this->username = $changedUsername->newUsername();
 }