uuid = $data['uuid']; $this->type = $data['type']; $this->username = $data['username']; $this->domain = $data['domain']; $this->display_name = $data['display_name']; } /** * Returns the Unique Universal Identifier (UUID v4) of the entity. * * @return string */ public function getUuid(): string { return $this->uuid; } /** * Returns the EntityType of the entity. * * @return EntityType */ public function getType(): EntityType { return $this->type; } /** * Returns the username of the entity. * * @return string */ public function getUsername(): string { return $this->username; } /** * Returns the domain that the entity belongs to, `LOCAL` for local entities. * * @return string */ public function getDomain(): string { return $this->domain; } /** * Returns the display name of the entity. * * @return string */ public function getDisplayName(): string { return $this->display_name; } /** * Returns the address of the entity in the format `username@domain`. * * @return string */ public function getAddress(): string { return sprintf('%s@%s', $this->username, $this->domain); } }