1 | <?php |
||
17 | class PostVoteShare implements InputFilterAwareInterface, \JsonSerializable |
||
18 | { |
||
19 | protected $inputFilter; |
||
20 | |||
21 | /** |
||
22 | * @ORM\Id |
||
23 | * @ORM\Column(type="integer"); |
||
24 | * @ORM\GeneratedValue(strategy="AUTO") |
||
25 | */ |
||
26 | protected $id; |
||
27 | |||
28 | /** |
||
29 | * @ORM\ManyToOne(targetEntity="PostVotePost", inversedBy="shares") |
||
30 | * @ORM\JoinColumn(name="post_id", referencedColumnName="id", onDelete="CASCADE") |
||
31 | **/ |
||
32 | protected $post; |
||
33 | |||
34 | /** |
||
35 | * @ORM\ManyToOne(targetEntity="PostVote") |
||
36 | **/ |
||
37 | protected $postvote; |
||
38 | |||
39 | /** |
||
40 | * @ORM\ManyToOne(targetEntity="PlaygroundUser\Entity\User") |
||
41 | * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id", onDelete="CASCADE") |
||
42 | **/ |
||
43 | protected $user; |
||
44 | |||
45 | /** |
||
46 | * @ORM\Column(type="text", nullable=true) |
||
47 | */ |
||
48 | protected $ip; |
||
49 | |||
50 | /** |
||
51 | * @ORM\Column(type="text", nullable=true) |
||
52 | */ |
||
53 | protected $origin; |
||
54 | |||
55 | /** |
||
56 | * @ORM\Column(name="created_at", type="datetime") |
||
57 | */ |
||
58 | protected $createdAt; |
||
59 | |||
60 | /** |
||
61 | * @ORM\Column(name="updated_at", type="datetime") |
||
62 | */ |
||
63 | protected $updatedAt; |
||
64 | |||
65 | public function __construct() |
||
69 | |||
70 | /** @PrePersist */ |
||
71 | public function createChrono() |
||
76 | |||
77 | /** @PreUpdate */ |
||
78 | public function updateChrono() |
||
82 | |||
83 | /** |
||
84 | * @return the unknown_type |
||
85 | */ |
||
86 | public function getId() |
||
90 | |||
91 | /** |
||
92 | * @param unknown_type $id |
||
93 | */ |
||
94 | public function setId($id) |
||
100 | |||
101 | /** |
||
102 | * @return string unknown_type |
||
103 | */ |
||
104 | public function getIp() |
||
108 | |||
109 | /** |
||
110 | * @param string $ip |
||
111 | */ |
||
112 | public function setIp($ip) |
||
118 | |||
119 | /** |
||
120 | * @return the unknown_type |
||
121 | */ |
||
122 | public function getUser() |
||
126 | |||
127 | /** |
||
128 | * @param unknown_type $user |
||
129 | */ |
||
130 | public function setUser($user) |
||
136 | |||
137 | /** |
||
138 | * @return the unknown_type |
||
139 | */ |
||
140 | public function getPost() |
||
144 | |||
145 | /** |
||
146 | * @param unknown_type $post |
||
147 | */ |
||
148 | public function setPost($post) |
||
156 | |||
157 | /** |
||
158 | * @return the unknown_type |
||
159 | */ |
||
160 | public function getPostvote() |
||
164 | |||
165 | /** |
||
166 | * @param unknown_type $postvote |
||
167 | */ |
||
168 | public function setPostvote($postvote) |
||
174 | |||
175 | /** |
||
176 | * @return the $origin |
||
177 | */ |
||
178 | public function getOrigin() |
||
182 | |||
183 | /** |
||
184 | * @param string $origin |
||
185 | */ |
||
186 | public function setOrigin($origin) |
||
192 | |||
193 | /** |
||
194 | * @return the unknown_type |
||
195 | */ |
||
196 | public function getCreatedAt() |
||
200 | |||
201 | /** |
||
202 | * @param unknown_type $createdAt |
||
203 | */ |
||
204 | public function setCreatedAt($createdAt) |
||
210 | |||
211 | /** |
||
212 | * @return the unknown_type |
||
213 | */ |
||
214 | public function getUpdatedAt() |
||
218 | |||
219 | /** |
||
220 | * @param unknown_type $updatedAt |
||
221 | */ |
||
222 | public function setUpdatedAt($updatedAt) |
||
228 | |||
229 | /** |
||
230 | * Convert the object to an array. |
||
231 | * |
||
232 | * @return array |
||
233 | */ |
||
234 | public function getArrayCopy() |
||
240 | |||
241 | /** |
||
242 | * Convert the object to json. |
||
243 | * |
||
244 | * @return array |
||
245 | */ |
||
246 | public function jsonSerialize() |
||
250 | |||
251 | /** |
||
252 | * Populate from an array. |
||
253 | * |
||
254 | * @param array $data |
||
255 | */ |
||
256 | public function populate($data = array()) |
||
259 | |||
260 | public function setInputFilter(InputFilterInterface $inputFilter) |
||
264 | |||
265 | public function getInputFilter() |
||
275 | } |
||
276 |