1 | <?php |
||
23 | trait CloseTrait |
||
24 | { |
||
25 | /** |
||
26 | * Boolean that shows it can close or not. |
||
27 | * |
||
28 | * @var bool |
||
29 | */ |
||
30 | protected $canClose; |
||
31 | |||
32 | /** |
||
33 | * Number of close votes. |
||
34 | * |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $closeVoteCount; |
||
38 | |||
39 | /** |
||
40 | * Closed date. |
||
41 | * |
||
42 | * @var \DateTime|null |
||
43 | */ |
||
44 | protected $closedDate; |
||
45 | |||
46 | /** |
||
47 | * Closed details. |
||
48 | * |
||
49 | * @var \BenatEspina\StackExchangeApiClient\Model\Interfaces\ClosedDetailsInterface|null |
||
50 | */ |
||
51 | protected $closedDetails; |
||
52 | |||
53 | /** |
||
54 | * Closed reason. |
||
55 | * |
||
56 | * @var string|null |
||
57 | */ |
||
58 | protected $closedReason; |
||
59 | |||
60 | /** |
||
61 | * Sets can close. |
||
62 | * |
||
63 | * @param bool $canClose The canClose boolean |
||
64 | * |
||
65 | * @return $this self Object |
||
66 | */ |
||
67 | public function setCanClose($canClose) |
||
73 | |||
74 | /** |
||
75 | * Gets can close. |
||
76 | * |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function isCanClose() |
||
83 | |||
84 | /** |
||
85 | * Sets number of close votes. |
||
86 | * |
||
87 | * @param int $closeVoteCount The number of close votes |
||
88 | * |
||
89 | * @return $this self Object |
||
90 | */ |
||
91 | public function setCloseVoteCount($closeVoteCount) |
||
97 | |||
98 | /** |
||
99 | * Gets close vote count. |
||
100 | * |
||
101 | * @return int |
||
102 | */ |
||
103 | public function getCloseVoteCount() |
||
107 | |||
108 | /** |
||
109 | * Sets closed date. |
||
110 | * |
||
111 | * @param \DateTime|null $closedDate The closed date |
||
|
|||
112 | * |
||
113 | * @return $this self Object |
||
114 | */ |
||
115 | public function setClosedDate(\DateTime $closedDate) |
||
121 | |||
122 | /** |
||
123 | * Gets closed date. |
||
124 | * |
||
125 | * @return \DateTime|null |
||
126 | */ |
||
127 | public function getClosedDate() |
||
131 | |||
132 | /** |
||
133 | * Sets closed details. |
||
134 | * |
||
135 | * @param \BenatEspina\StackExchangeApiClient\Model\Interfaces\ClosedDetailsInterface|null $closedDetails The closed |
||
136 | * details |
||
137 | * |
||
138 | * @return $this self Object |
||
139 | */ |
||
140 | public function setClosedDetails(ClosedDetailsInterface $closedDetails) |
||
146 | |||
147 | /** |
||
148 | * Gets closed details. |
||
149 | * |
||
150 | * @return \BenatEspina\StackExchangeApiClient\Model\Interfaces\ClosedDetailsInterface|null |
||
151 | */ |
||
152 | public function getClosedDetails() |
||
156 | |||
157 | /** |
||
158 | * Sets closed reason. |
||
159 | * |
||
160 | * @param string|null $closedReason The closed reason |
||
161 | * |
||
162 | * @return $this self Object |
||
163 | */ |
||
164 | public function setClosedReason($closedReason) |
||
170 | |||
171 | /** |
||
172 | * Gets closed reason. |
||
173 | * |
||
174 | * @return string|null |
||
175 | */ |
||
176 | public function getClosedReason() |
||
180 | |||
181 | /** |
||
182 | * Loads the variables if the data exist into resource. It works like a constructor. |
||
183 | * |
||
184 | * @param null|mixed[] $resource The resource |
||
185 | */ |
||
186 | protected function loadClose($resource) |
||
194 | } |
||
195 |