1 | <?php |
||
31 | class UserPicture implements Proxy |
||
32 | { |
||
33 | /** |
||
34 | * @var UserA $user User |
||
35 | * |
||
36 | * @ORM\ManyToOne(targetEntity="Fresh\VichUploaderSerializationBundle\Tests\Fixtures\UserA", inversedBy="pictures") |
||
37 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id") |
||
38 | */ |
||
39 | private $user; |
||
40 | |||
41 | /** |
||
42 | * @var string $photoName Photo name |
||
43 | * |
||
44 | * @ORM\Column(type="string", length=255) |
||
45 | * |
||
46 | * @JMS\Expose |
||
47 | * @JMS\SerializedName("photo") |
||
48 | * |
||
49 | * @Fresh\VichSerializableField("photoFile") |
||
50 | */ |
||
51 | private $photoName; |
||
52 | |||
53 | /** |
||
54 | * @var File $photoFile Photo file |
||
55 | * |
||
56 | * @JMS\Exclude |
||
57 | * |
||
58 | * @Vich\UploadableField(mapping="user_photo_mapping", fileNameProperty="photoName") |
||
59 | */ |
||
60 | private $photoFile; |
||
61 | |||
62 | /** |
||
63 | * @var string $coverName Cover name |
||
64 | * |
||
65 | * @ORM\Column(type="string", length=255) |
||
66 | * |
||
67 | * @JMS\Expose |
||
68 | * @JMS\SerializedName("cover") |
||
69 | * |
||
70 | * @Fresh\VichSerializableField("coverFile") |
||
71 | */ |
||
72 | private $coverName; |
||
73 | |||
74 | /** |
||
75 | * @var File $coverFile Cover file |
||
76 | * |
||
77 | * @JMS\Exclude |
||
78 | * |
||
79 | * @Vich\UploadableField(mapping="user_cover_mapping", fileNameProperty="coverName") |
||
80 | */ |
||
81 | private $coverFile; |
||
82 | |||
83 | /** |
||
84 | * @var bool $status Status |
||
85 | */ |
||
86 | private $status = false; |
||
87 | |||
88 | /** |
||
89 | * @inheritdoc |
||
90 | */ |
||
91 | public function __load() |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function __isInitialized() |
||
105 | |||
106 | /** |
||
107 | * To string |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | public function __toString() |
||
117 | |||
118 | /** |
||
119 | * Set user |
||
120 | * |
||
121 | * @param UserA $user User |
||
122 | * |
||
123 | * @return $this |
||
124 | */ |
||
125 | public function setUser(UserA $user = null) |
||
131 | |||
132 | /** |
||
133 | * Get user |
||
134 | * |
||
135 | * @return UserA User |
||
136 | */ |
||
137 | public function getUser() |
||
141 | |||
142 | /** |
||
143 | * Get photo name |
||
144 | * |
||
145 | * @return string Photo name |
||
146 | */ |
||
147 | public function getPhotoName() |
||
151 | |||
152 | /** |
||
153 | * Set photo name |
||
154 | * |
||
155 | * @param string $photoName Photo name |
||
156 | * |
||
157 | * @return $this |
||
158 | */ |
||
159 | public function setPhotoName($photoName) |
||
165 | |||
166 | /** |
||
167 | * Get photo file |
||
168 | * |
||
169 | * @return File Photo file |
||
170 | */ |
||
171 | public function getPhotoFile() |
||
175 | |||
176 | /** |
||
177 | * Set photo file |
||
178 | * |
||
179 | * @param File $photoFile Photo file |
||
180 | * |
||
181 | * @return $this |
||
182 | */ |
||
183 | public function setPhotoFile(File $photoFile) |
||
189 | |||
190 | /** |
||
191 | * Get cover name |
||
192 | * |
||
193 | * @return string Cover name |
||
194 | */ |
||
195 | public function getCoverName() |
||
199 | |||
200 | /** |
||
201 | * Set cover name |
||
202 | * |
||
203 | * @param string $coverName Cover name |
||
204 | * |
||
205 | * @return $this |
||
206 | */ |
||
207 | public function setCoverName($coverName) |
||
213 | |||
214 | /** |
||
215 | * Get cover file |
||
216 | * |
||
217 | * @return File Cover file |
||
218 | */ |
||
219 | public function getCoverFile() |
||
223 | |||
224 | /** |
||
225 | * Set cover file |
||
226 | * |
||
227 | * @param File $coverFile Cover file |
||
228 | * |
||
229 | * @return $this |
||
230 | */ |
||
231 | public function setCoverFile(File $coverFile) |
||
237 | } |
||
238 |