1 | <?php |
||
19 | class Question extends AbstractModel |
||
20 | { |
||
21 | /** |
||
22 | * Title. |
||
23 | * |
||
24 | * @var string |
||
25 | * @DatabaseField(type="string") |
||
26 | */ |
||
27 | protected $title = ''; |
||
28 | |||
29 | /** |
||
30 | * Answer. |
||
31 | * |
||
32 | * @var string |
||
33 | * @DatabaseField(type="string") |
||
34 | */ |
||
35 | protected $answer = ''; |
||
36 | |||
37 | /** |
||
38 | * Tags. |
||
39 | * |
||
40 | * @var string |
||
41 | * @DatabaseField(type="string") |
||
42 | */ |
||
43 | protected $tags = ''; |
||
44 | |||
45 | /** |
||
46 | * Top Counter. |
||
47 | * |
||
48 | * @var int |
||
49 | * @DatabaseField(type="int") |
||
50 | */ |
||
51 | protected $topCounter = 0; |
||
52 | |||
53 | /** |
||
54 | * Flop Counter. |
||
55 | * |
||
56 | * @var int |
||
57 | * @DatabaseField(type="int") |
||
58 | */ |
||
59 | protected $flopCounter = 0; |
||
60 | |||
61 | /** |
||
62 | * @var int |
||
63 | */ |
||
64 | protected $_languageUid = 0; |
||
65 | |||
66 | /** |
||
67 | * Categories. |
||
68 | * |
||
69 | * @var ObjectStorage<QuestionCategory> |
||
70 | * @DatabaseField(type="int", sql="int(11) DEFAULT '0' NOT NULL") |
||
71 | */ |
||
72 | protected $categories; |
||
73 | |||
74 | /** |
||
75 | * @var \DateTime |
||
76 | */ |
||
77 | protected $crdate; |
||
78 | |||
79 | /** |
||
80 | * Question constructor. |
||
81 | */ |
||
82 | public function __construct() |
||
83 | { |
||
84 | $this->categories = new ObjectStorage(); |
||
85 | $this->crdate = new \DateTime(); |
||
86 | } |
||
87 | |||
88 | /** |
||
89 | * Set the title. |
||
90 | */ |
||
91 | public function setTitle(string $title): void |
||
92 | { |
||
93 | $this->title = $title; |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * Get the title. |
||
98 | */ |
||
99 | public function getTitle(): string |
||
100 | { |
||
101 | return $this->title; |
||
102 | } |
||
103 | |||
104 | /** |
||
105 | * Set answer. |
||
106 | */ |
||
107 | public function setAnswer(string $answer): void |
||
108 | { |
||
109 | $this->answer = $answer; |
||
110 | } |
||
111 | |||
112 | /** |
||
113 | * Get answer. |
||
114 | */ |
||
115 | public function getAnswer(): string |
||
119 | |||
120 | /** |
||
121 | * Set tags. |
||
122 | */ |
||
123 | public function setTags(string $tags): void |
||
127 | |||
128 | /** |
||
129 | * Get tags. |
||
130 | */ |
||
131 | public function getTags(): string |
||
135 | |||
136 | /** |
||
137 | * Set the top counter. |
||
138 | */ |
||
139 | public function setTopCounter(int $topCounter): void |
||
143 | |||
144 | /** |
||
145 | * Get the top counter. |
||
146 | */ |
||
147 | public function getTopCounter(): int |
||
151 | |||
152 | /** |
||
153 | * Set the categories. |
||
154 | * |
||
155 | * @param ObjectStorage $categories |
||
156 | */ |
||
157 | public function setCategories($categories): void |
||
161 | |||
162 | /** |
||
163 | * Get the categories. |
||
164 | */ |
||
165 | public function getCategories(): ObjectStorage |
||
169 | |||
170 | /** |
||
171 | * Set the Flop Counter. |
||
172 | */ |
||
173 | public function setFlopCounter(int $flopCounter): void |
||
177 | |||
178 | /** |
||
179 | * Get the flop counter. |
||
180 | */ |
||
181 | public function getFlopCounter(): int |
||
185 | |||
186 | /** |
||
187 | * Public getter for the languageUid. |
||
188 | */ |
||
189 | public function getLanguageId(): int |
||
193 | |||
194 | public function getCrdate(): \DateTime |
||
198 | } |
||
199 |