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

44 lines
963 B
PHP

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