mince/src/CapeInfo.php
2023-08-22 23:47:37 +00:00

34 lines
723 B
PHP

<?php
namespace Mince;
use Index\DateTime;
use Index\Data\IDbResult;
class CapeInfo {
private string $userId;
private string $hash;
private int $updated;
public function __construct(IDbResult $result) {
$this->userId = $result->getString(0);
$this->hash = $result->getString(1);
$this->updated = $result->getInteger(2);
}
public function getUserId(): string {
return $this->userId;
}
public function getHash(): string {
return $this->hash;
}
public function getUpdatedTime(): int {
return $this->updated;
}
public function getUpdatedAt(): DateTime {
return DateTime::fromUnixTimeSeconds($this->updated);
}
}