1 | <?php |
||
9 | class Information |
||
10 | { |
||
11 | use ImmutableTrait, SerializableTrait; |
||
12 | |||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $apiVersion; |
||
17 | |||
18 | /** |
||
19 | * @var float |
||
20 | */ |
||
21 | private $executionTime; |
||
22 | |||
23 | /** |
||
24 | * @var Carbon |
||
25 | */ |
||
26 | private $lastUpdated; |
||
27 | |||
28 | /** |
||
29 | * @var Carbon |
||
30 | */ |
||
31 | private $timestamp; |
||
32 | |||
33 | /** |
||
34 | * Information constructor. |
||
35 | * @param int $apiVersion |
||
36 | * @param float $executionTime |
||
37 | * @param Carbon $lastUpdate |
||
38 | * @param Carbon $timestamp |
||
39 | * @throws \Igorsgm\TibiaDataApi\Exceptions\ImmutableException |
||
40 | */ |
||
41 | public function __construct(int $apiVersion, float $executionTime, Carbon $lastUpdate, Carbon $timestamp) |
||
50 | |||
51 | /** |
||
52 | * @return int |
||
53 | */ |
||
54 | public function getApiVersion(): int |
||
58 | |||
59 | /** |
||
60 | * @return float |
||
61 | */ |
||
62 | public function getExecutionTime(): float |
||
66 | |||
67 | /** |
||
68 | * @return Carbon |
||
69 | */ |
||
70 | public function getLastUpdated(): Carbon |
||
74 | |||
75 | /** |
||
76 | * @return Carbon |
||
77 | */ |
||
78 | public function getTimestamp(): Carbon |
||
82 | } |
||
83 |