2023-07-20 19:36:43 +00:00
|
|
|
<?php
|
|
|
|
namespace Misuzu\Profile;
|
|
|
|
|
|
|
|
use Index\Data\IDbResult;
|
|
|
|
|
|
|
|
class ProfileFieldValueInfo {
|
2024-02-07 00:04:45 +00:00
|
|
|
public function __construct(
|
|
|
|
private string $fieldId,
|
|
|
|
private string $userId,
|
|
|
|
private string $formatId,
|
|
|
|
private string $value,
|
|
|
|
) {}
|
2023-07-20 19:36:43 +00:00
|
|
|
|
2024-02-07 00:04:45 +00:00
|
|
|
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)
|
|
|
|
);
|
2023-07-20 19:36:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|