1 | <?php |
||
26 | class ArticleStatistics implements ArticleStatisticsInterface, TimestampableInterface |
||
27 | { |
||
28 | use TimestampableTrait; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $id; |
||
34 | |||
35 | /** |
||
36 | * @var ArticleInterface |
||
37 | */ |
||
38 | protected $article; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $impressionsNumber = 0; |
||
44 | |||
45 | /** |
||
46 | * @var int |
||
47 | */ |
||
48 | protected $pageViewsNumber = 0; |
||
49 | |||
50 | /** |
||
51 | * @var Collection |
||
52 | */ |
||
53 | protected $events; |
||
54 | |||
55 | /** |
||
56 | * ArticleStatistics constructor. |
||
57 | */ |
||
58 | public function __construct() |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function getId() |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function getArticle(): ArticleInterface |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public function setArticle(ArticleInterface $article): void |
||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | public function getImpressionsNumber(): int |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function setImpressionsNumber(int $impressionsNumber): void |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function getPageViewsNumber(): int |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public function setPageViewsNumber(int $pageViewsNumber): void |
||
118 | |||
119 | /** |
||
120 | * {@inheritdoc} |
||
121 | */ |
||
122 | public function increasePageViewsNumber(): void |
||
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | public function getEvents(): Collection |
||
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | public function setEvents(Collection $events): void |
||
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | public function addEvent(ArticleEventInterface $articleEvent): void |
||
150 | } |
||
151 |