1 | <?php |
||
31 | class UserPictures implements Proxy |
||
32 | { |
||
33 | /** |
||
34 | * @ORM\ManyToOne(targetEntity="Fresh\VichUploaderSerializationBundle\Tests\Fixtures\UserA", inversedBy="pictures") |
||
35 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id") |
||
36 | */ |
||
37 | protected $user; |
||
38 | |||
39 | /** |
||
40 | * @ORM\Column(type="integer") |
||
41 | */ |
||
42 | protected $userId; |
||
43 | |||
44 | /** |
||
45 | * @var string $photoName Photo name |
||
46 | * |
||
47 | * @ORM\Column(type="string", length=255) |
||
48 | * |
||
49 | * @JMS\Expose |
||
50 | * @JMS\SerializedName("photo") |
||
51 | * |
||
52 | * @Fresh\VichSerializableField("photoFile") |
||
53 | */ |
||
54 | private $photoName; |
||
55 | |||
56 | /** |
||
57 | * @var File $photoFile Photo file |
||
58 | * |
||
59 | * @JMS\Exclude |
||
60 | * |
||
61 | * @Vich\UploadableField(mapping="user_photo_mapping", fileNameProperty="photoName") |
||
62 | */ |
||
63 | private $photoFile; |
||
64 | |||
65 | /** |
||
66 | * @var string $coverName Cover name |
||
67 | * |
||
68 | * @ORM\Column(type="string", length=255) |
||
69 | * |
||
70 | * @JMS\Expose |
||
71 | * @JMS\SerializedName("cover") |
||
72 | * |
||
73 | * @Fresh\VichSerializableField("coverFile") |
||
74 | */ |
||
75 | private $coverName; |
||
76 | |||
77 | /** |
||
78 | * @var File $coverFile Cover file |
||
79 | * |
||
80 | * @JMS\Exclude |
||
81 | * |
||
82 | * @Vich\UploadableField(mapping="user_cover_mapping", fileNameProperty="coverName") |
||
83 | */ |
||
84 | private $coverFile; |
||
85 | |||
86 | /** |
||
87 | * @var bool |
||
88 | */ |
||
89 | private $status = false; |
||
90 | |||
91 | /** |
||
92 | * @inheritdoc |
||
93 | */ |
||
94 | public function __load() |
||
100 | |||
101 | /** |
||
102 | * @inheritdoc |
||
103 | * @return bool |
||
104 | */ |
||
105 | public function __isInitialized() |
||
109 | |||
110 | /** |
||
111 | * To string |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | public function __toString() |
||
121 | |||
122 | /** |
||
123 | * Get photo name |
||
124 | * |
||
125 | * @return string Photo name |
||
126 | */ |
||
127 | public function getPhotoName() |
||
131 | |||
132 | /** |
||
133 | * Set photo name |
||
134 | * |
||
135 | * @param string $photoName Photo name |
||
136 | * |
||
137 | * @return $this |
||
138 | */ |
||
139 | public function setPhotoName($photoName) |
||
145 | |||
146 | /** |
||
147 | * Get photo file |
||
148 | * |
||
149 | * @return File Photo file |
||
150 | */ |
||
151 | public function getPhotoFile() |
||
155 | |||
156 | /** |
||
157 | * Set photo file |
||
158 | * |
||
159 | * @param File $photoFile Photo file |
||
160 | * |
||
161 | * @return $this |
||
162 | */ |
||
163 | public function setPhotoFile(File $photoFile) |
||
169 | |||
170 | /** |
||
171 | * Get cover name |
||
172 | * |
||
173 | * @return string Cover name |
||
174 | */ |
||
175 | public function getCoverName() |
||
179 | |||
180 | /** |
||
181 | * Set cover name |
||
182 | * |
||
183 | * @param string $coverName Cover name |
||
184 | * |
||
185 | * @return $this |
||
186 | */ |
||
187 | public function setCoverName($coverName) |
||
193 | |||
194 | /** |
||
195 | * Get cover file |
||
196 | * |
||
197 | * @return File Cover file |
||
198 | */ |
||
199 | public function getCoverFile() |
||
203 | |||
204 | /** |
||
205 | * Set cover file |
||
206 | * |
||
207 | * @param File $coverFile Cover file |
||
208 | * |
||
209 | * @return $this |
||
210 | */ |
||
211 | public function setCoverFile(File $coverFile) |
||
217 | |||
218 | /** |
||
219 | * Set userId |
||
220 | * |
||
221 | * @param integer $userId |
||
222 | * |
||
223 | * @return $this |
||
224 | */ |
||
225 | public function setUserId($userId) |
||
231 | |||
232 | /** |
||
233 | * Get userId |
||
234 | * |
||
235 | * @return integer |
||
236 | */ |
||
237 | public function getUserId() |
||
241 | |||
242 | /** |
||
243 | * Set user |
||
244 | * |
||
245 | * @param UserA $user |
||
246 | * |
||
247 | * @return $this |
||
248 | */ |
||
249 | public function setUser(UserA $user = null) |
||
255 | |||
256 | /** |
||
257 | * Get user |
||
258 | * |
||
259 | * @return UserA |
||
260 | */ |
||
261 | public function getUser() |
||
265 | } |
||
266 |