1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace ExileeD\Inoreader\Objects; |
6
|
|
|
|
7
|
|
|
class Item extends AbstractObject implements ObjectInterface |
8
|
|
|
{ |
9
|
|
|
|
10
|
3 |
|
public function crawlTimeMsec() |
11
|
|
|
{ |
12
|
3 |
|
return $this->data->crawlTimeMsec; |
13
|
|
|
} |
14
|
|
|
|
15
|
3 |
|
public function timestampUsec() |
16
|
|
|
{ |
17
|
3 |
|
return $this->data->timestampUsec; |
18
|
|
|
} |
19
|
|
|
|
20
|
|
|
public function categories(): array |
21
|
|
|
{ |
22
|
|
|
return $this->data->categories; |
23
|
|
|
} |
24
|
|
|
|
25
|
3 |
|
public function title() |
26
|
|
|
{ |
27
|
3 |
|
return $this->data->title; |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
public function published(): int |
31
|
|
|
{ |
32
|
|
|
return $this->data->published; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
public function updated(): int |
36
|
|
|
{ |
37
|
|
|
return $this->data->updated; |
38
|
|
|
} |
39
|
|
|
|
40
|
3 |
|
public function id(): string |
41
|
|
|
{ |
42
|
3 |
|
return $this->data->id; |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** */ |
46
|
|
|
public function canonical(): array |
47
|
|
|
{ |
48
|
|
|
return array_map(fn($item) => new ItemCanonical($item), $this->data->canonical); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
public function alternate() |
52
|
|
|
{ |
53
|
|
|
return $this->data->alternate; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
public function summary(): Summary |
57
|
|
|
{ |
58
|
|
|
return new Summary($this->data->summary); |
59
|
|
|
} |
60
|
|
|
|
61
|
3 |
|
public function author(): string |
62
|
|
|
{ |
63
|
3 |
|
return $this->data->author; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
public function likingUsers(): array |
67
|
|
|
{ |
68
|
|
|
return $this->data->id; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
public function comments(): array |
72
|
|
|
{ |
73
|
|
|
return $this->data->comments; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
public function commentsNum() |
77
|
|
|
{ |
78
|
|
|
return $this->data->commentsNum; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
public function annotations() |
82
|
|
|
{ |
83
|
|
|
return $this->data->id; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
public function origin() |
87
|
|
|
{ |
88
|
|
|
return $this->data->origin; |
89
|
|
|
} |
90
|
|
|
} |
91
|
|
|
|