ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ForumDto.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 private int $top_pk;
24 private int $top_frm_fk;
25 private string $top_name;
26 private string $top_description;
27 private int $top_num_posts;
28 private int $top_num_threads;
29 private ?string $top_last_post = null;
30 private int $top_mods;
31 private ?string $top_date = null;
32 private int $visits;
33 private ?string $top_update = null;
34 private int $update_user;
35 private int $top_usr_id;
36
37 public function getTopPk(): int
38 {
39 return $this->top_pk;
40 }
41
42 public function setTopPk(int $top_pk): void
43 {
44 $this->top_pk = $top_pk;
45 }
46
47 public function getTopFrmFk(): int
48 {
49 return $this->top_frm_fk;
50 }
51
52 public function setTopFrmFk(int $top_frm_fk): void
53 {
54 $this->top_frm_fk = $top_frm_fk;
55 }
56
57 public function getTopName(): string
58 {
59 return $this->top_name;
60 }
61
62 public function setTopName(string $top_name): void
63 {
64 $this->top_name = trim($top_name);
65 }
66
67 public function getTopDescription(): string
68 {
70 }
71
72 public function setTopDescription(string $top_description): void
73 {
74 $this->top_description = nl2br($top_description);
75 }
76
77 public function getTopNumPosts(): int
78 {
80 }
81
82 public function setTopNumPosts(int $top_num_posts): void
83 {
84 $this->top_num_posts = $top_num_posts;
85 }
86
87 public function getTopNumThreads(): int
88 {
90 }
91
92 public function setTopNumThreads(int $top_num_threads): void
93 {
94 $this->top_num_threads = $top_num_threads;
95 }
96
97 public function getTopLastPost(): ?string
98 {
100 }
101
102 public function setTopLastPost(?string $top_last_post): void
103 {
104 $this->top_last_post = $top_last_post;
105 }
106
107 public function getTopMods(): int
108 {
109 return $this->top_mods;
110 }
111
112 public function setTopMods(int $top_mods): void
113 {
114 $this->top_mods = $top_mods;
115 }
116
117 public function getTopDate(): ?string
118 {
119 return $this->top_date;
120 }
121
122 public function setTopDate(?string $top_date): void
123 {
124 $this->top_date = $top_date;
125 }
126
127 public function getVisits(): int
128 {
129 return $this->visits;
130 }
131
132 public function setVisits(int $visits): void
133 {
134 $this->visits = $visits;
135 }
136
137 public function getTopUpdate(): ?string
138 {
139 return $this->top_update;
140 }
141
142 public function setTopUpdate(?string $top_update): void
143 {
144 $this->top_update = $top_update;
145 }
146
147 public function getUpdateUser(): int
148 {
149 return $this->update_user;
150 }
151
152 public function setUpdateUser(int $update_user): void
153 {
154 $this->update_user = $update_user;
155 }
156
157 public function getTopUsrId(): int
158 {
159 return $this->top_usr_id;
160 }
161
162 public function setTopUsrId(int $top_usr_id): void
163 {
164 $this->top_usr_id = $top_usr_id;
165 }
166
167 public static function getInstanceFromArray(array $record): self
168 {
169 $instance = new self();
170
171 $instance->setTopPk((int) $record['top_pk']);
172 $instance->setTopFrmFk((int) $record['top_frm_fk']);
173 $instance->setTopName((string) $record['top_name']);
174 $instance->setTopDescription((string) $record['top_description']);
175 $instance->setTopNumPosts((int) $record['top_num_posts']);
176 $instance->setTopNumThreads((int) $record['top_num_threads']);
177 $instance->setTopLastPost($record['top_last_post']);
178 $instance->setTopMods((int) $record['top_mods']);
179 $instance->setTopDate($record['top_date']);
180 $instance->setVisits((int) $record['visits']);
181 $instance->setTopUpdate($record['top_update']);
182 $instance->setUpdateUser((int) $record['update_user']);
183 $instance->setTopUsrId((int) $record['top_usr_id']);
184
185 return $instance;
186 }
187
188 public static function getEmptyInstance(): self
189 {
190 return new self();
191 }
192}
setTopMods(int $top_mods)
setUpdateUser(int $update_user)
int $update_user
setTopPk(int $top_pk)
setTopUsrId(int $top_usr_id)
string $top_date
setTopNumThreads(int $top_num_threads)
setVisits(int $visits)
int $top_num_threads
string $top_description
static getEmptyInstance()
static getInstanceFromArray(array $record)
setTopNumPosts(int $top_num_posts)
string $top_name
setTopDate(?string $top_date)
setTopUpdate(?string $top_update)
setTopLastPost(?string $top_last_post)
int $top_num_posts
string $top_last_post
string $top_update
setTopDescription(string $top_description)
setTopFrmFk(int $top_frm_fk)
setTopName(string $top_name)