34 lines
723 B
PHP
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);
|
|
}
|
|
}
|