1 | <?php |
||
21 | trait RequiresTrait |
||
22 | { |
||
23 | /** |
||
24 | * Boolean that shows if comment is required or not. |
||
25 | * |
||
26 | * @var bool|null |
||
27 | */ |
||
28 | protected $requiresComment; |
||
29 | |||
30 | /** |
||
31 | * Boolean that shows if question id is required or not. |
||
32 | * |
||
33 | * @var bool|null |
||
34 | */ |
||
35 | protected $requiresQuestionId; |
||
36 | |||
37 | /** |
||
38 | * Boolean that shows if site id is required or not. |
||
39 | * |
||
40 | * @var bool|null |
||
41 | */ |
||
42 | protected $requiresSite; |
||
43 | |||
44 | /** |
||
45 | * Sets requires comment. |
||
46 | * |
||
47 | * @param bool|null $requiresComment The requires comment boolean |
||
48 | * |
||
49 | * @return $this self Object |
||
50 | */ |
||
51 | public function setRequiresComment($requiresComment) |
||
57 | |||
58 | /** |
||
59 | * Gets requires comment. |
||
60 | * |
||
61 | * @return bool|null |
||
62 | */ |
||
63 | public function isRequiresComment() |
||
67 | |||
68 | /** |
||
69 | * Sets requires question id. |
||
70 | * |
||
71 | * @param bool|null $requiresQuestionId The requires question id boolean |
||
72 | * |
||
73 | * @return $this self Object |
||
74 | */ |
||
75 | public function setRequiresQuestionId($requiresQuestionId) |
||
81 | |||
82 | /** |
||
83 | * Gets requires question id. |
||
84 | * |
||
85 | * @return bool|null |
||
86 | */ |
||
87 | public function isRequiresQuestionId() |
||
91 | |||
92 | /** |
||
93 | * Sets requires site. |
||
94 | * |
||
95 | * @param bool|null $requiresSite The requires site boolean |
||
96 | * |
||
97 | * @return $this self Object |
||
98 | */ |
||
99 | public function setRequiresSite($requiresSite) |
||
105 | |||
106 | /** |
||
107 | * Gets requires site. |
||
108 | * |
||
109 | * @return bool|null |
||
110 | */ |
||
111 | public function isRequiresSite() |
||
115 | |||
116 | /** |
||
117 | * Loads the variables if the data exist into resource. It works like a constructor. |
||
118 | * |
||
119 | * @param null|mixed[] $resource The resource |
||
120 | */ |
||
121 | protected function loadAnswered($resource) |
||
127 | } |
||
128 |