2
0
Fork 0
forked from flashii/eeprom
eeprom-nabucco/src/Apps/AppInfo.php

52 lines
1.2 KiB
PHP

<?php
namespace EEPROM\Apps;
use Index\DateTime;
use Index\Data\IDbResult;
class AppInfo {
private string $id;
private string $name;
private int $created;
private int $sizeLimit;
private bool $allowSizeMultiplier;
private int $expiry;
public function __construct(IDbResult $result) {
$this->id = $result->getString(0);
$this->name = $result->getString(1);
$this->created = $result->getInteger(2);
$this->sizeLimit = $result->getInteger(3);
$this->allowSizeMultiplier = $result->getBoolean(4);
$this->expiry = $result->getInteger(5);
}
public function getId(): string {
return $this->id;
}
public function getName(): string {
return $this->name;
}
public function getCreatedTime(): int {
return $this->created;
}
public function getCreatedAt(): DateTime {
return DateTime::fromUnixTimeSeconds($this->created);
}
public function getDataSizeLimit(): int {
return $this->sizeLimit;
}
public function allowSizeMultiplier(): bool {
return $this->allowSizeMultiplier;
}
public function getBumpAmount(): int {
return $this->expiry;
}
}