misuzu/src/Profile/ProfileFieldValueInfo.php

38 lines
899 B
PHP

<?php
namespace Misuzu\Profile;
use Index\Data\IDbResult;
class ProfileFieldValueInfo {
public function __construct(
private string $fieldId,
private string $userId,
private string $formatId,
private string $value,
) {}
public static function fromResult(IDbResult $result): ProfileFieldValueInfo {
return new ProfileFieldValueInfo(
fieldId: $result->getString(0),
userId: $result->getString(1),
formatId: $result->getString(2),
value: $result->getString(3)
);
}
public function getFieldId(): string {
return $this->fieldId;
}
public function getUserId(): string {
return $this->userId;
}
public function getFormatId(): string {
return $this->formatId;
}
public function getValue(): string {
return $this->value;
}
}