|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Smartbox\CoreBundle\Tests\Fixtures\Entity; |
|
4
|
|
|
|
|
5
|
|
|
use JMS\Serializer\Annotation as JMS; |
|
6
|
|
|
use Smartbox\CoreBundle\Type\Entity; |
|
7
|
|
|
use Smartbox\CoreBundle\Type\SerializableInterface; |
|
8
|
|
|
use Smartbox\CoreBundle\Type\Traits\HasInternalType; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* Class SerializableThing. |
|
12
|
|
|
*/ |
|
13
|
|
|
class SerializableThing implements SerializableInterface |
|
14
|
|
|
{ |
|
15
|
|
|
use HasInternalType; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* @JMS\Type("integer") |
|
19
|
|
|
* @JMS\Expose |
|
20
|
|
|
* |
|
21
|
|
|
* @var int |
|
22
|
|
|
*/ |
|
23
|
|
|
protected $integerValue; |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* @JMS\Type("double") |
|
27
|
|
|
* @JMS\Expose |
|
28
|
|
|
* |
|
29
|
|
|
* @var float |
|
30
|
|
|
*/ |
|
31
|
|
|
protected $doubleValue; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @JMS\Type("string") |
|
35
|
|
|
* @JMS\Expose |
|
36
|
|
|
* |
|
37
|
|
|
* @var string |
|
38
|
|
|
*/ |
|
39
|
|
|
protected $stringValue; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @var Entity |
|
43
|
|
|
* @JMS\Type("Smartbox\CoreBundle\Tests\Fixtures\Entity\TestEntity") |
|
44
|
|
|
* @JMS\Expose |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $nestedEntity; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @JMS\Type("array<Smartbox\CoreBundle\Tests\Fixtures\Entity\TestEntity>") |
|
50
|
|
|
* @JMS\Expose |
|
51
|
|
|
* |
|
52
|
|
|
* @var \Smartbox\CoreBundle\Tests\Fixtures\Entity\TestEntity[] |
|
53
|
|
|
*/ |
|
54
|
|
|
protected $arrayOfEntities = []; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* @JMS\Type("array<Smartbox\CoreBundle\Type\IntegerType>") |
|
58
|
|
|
* @JMS\Expose |
|
59
|
|
|
* |
|
60
|
|
|
* @var \Smartbox\CoreBundle\Type\IntegerType[] |
|
61
|
|
|
*/ |
|
62
|
|
|
protected $arrayOfIntegers = []; |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @JMS\Type("array<Smartbox\CoreBundle\Type\StringType>") |
|
66
|
|
|
* @JMS\Expose |
|
67
|
|
|
* |
|
68
|
|
|
* @var \Smartbox\CoreBundle\Type\StringType[] |
|
69
|
|
|
*/ |
|
70
|
|
|
protected $arrayOfStrings = []; |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* @JMS\Type("array<Smartbox\CoreBundle\Type\DoubleType>") |
|
74
|
|
|
* @JMS\Expose |
|
75
|
|
|
* |
|
76
|
|
|
* @var \Smartbox\CoreBundle\Type\DoubleType[] |
|
77
|
|
|
*/ |
|
78
|
|
|
protected $arrayOfDoubles = []; |
|
79
|
|
|
|
|
80
|
|
|
/** |
|
81
|
|
|
* @JMS\Type("array<Smartbox\CoreBundle\Type\Date>") |
|
82
|
|
|
* @JMS\Expose |
|
83
|
|
|
* |
|
84
|
|
|
* @var \Smartbox\CoreBundle\Type\Date[] |
|
85
|
|
|
*/ |
|
86
|
|
|
protected $arrayOfDates = []; |
|
87
|
|
|
|
|
88
|
|
|
/** |
|
89
|
|
|
* @JMS\Type("array<DateTime>") |
|
90
|
|
|
* @JMS\Expose |
|
91
|
|
|
* |
|
92
|
|
|
* @var \DateTime[] |
|
93
|
|
|
*/ |
|
94
|
|
|
protected $arrayOfDateTimes = []; |
|
95
|
|
|
|
|
96
|
|
|
public function __construct() |
|
97
|
|
|
{ |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
|
|
/** |
|
101
|
|
|
* @return int |
|
102
|
|
|
*/ |
|
103
|
|
|
public function getIntegerValue() |
|
104
|
|
|
{ |
|
105
|
|
|
return $this->integerValue; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* @param int $integerValue |
|
110
|
|
|
*/ |
|
111
|
|
|
public function setIntegerValue($integerValue) |
|
112
|
|
|
{ |
|
113
|
|
|
$this->integerValue = $integerValue; |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
/** |
|
117
|
|
|
* @return float |
|
118
|
|
|
*/ |
|
119
|
|
|
public function getDoubleValue() |
|
120
|
|
|
{ |
|
121
|
|
|
return $this->doubleValue; |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
/** |
|
125
|
|
|
* @param float $doubleValue |
|
126
|
|
|
*/ |
|
127
|
|
|
public function setDoubleValue($doubleValue) |
|
128
|
|
|
{ |
|
129
|
|
|
$this->doubleValue = $doubleValue; |
|
130
|
|
|
} |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* @return string |
|
134
|
|
|
*/ |
|
135
|
|
|
public function getStringValue() |
|
136
|
|
|
{ |
|
137
|
|
|
return $this->stringValue; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
/** |
|
141
|
|
|
* @param string $stringValue |
|
142
|
|
|
*/ |
|
143
|
|
|
public function setStringValue($stringValue) |
|
144
|
|
|
{ |
|
145
|
|
|
$this->stringValue = $stringValue; |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
/** |
|
149
|
|
|
* @return Entity |
|
150
|
|
|
*/ |
|
151
|
|
|
public function getNestedEntity() |
|
152
|
|
|
{ |
|
153
|
|
|
return $this->nestedEntity; |
|
154
|
|
|
} |
|
155
|
|
|
|
|
156
|
|
|
/** |
|
157
|
|
|
* @param Entity $nestedEntity |
|
158
|
|
|
*/ |
|
159
|
|
|
public function setNestedEntity($nestedEntity) |
|
160
|
|
|
{ |
|
161
|
|
|
$this->nestedEntity = $nestedEntity; |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
|
|
/** |
|
165
|
|
|
* @return \Smartbox\CoreBundle\Tests\Fixtures\Entity\TestEntity[] |
|
166
|
|
|
*/ |
|
167
|
|
|
public function getArrayOfEntities() |
|
168
|
|
|
{ |
|
169
|
|
|
return $this->arrayOfEntities; |
|
170
|
|
|
} |
|
171
|
|
|
|
|
172
|
|
|
/** |
|
173
|
|
|
* @param \Smartbox\CoreBundle\Tests\Fixtures\Entity\TestEntity[] $arrayOfEntities |
|
174
|
|
|
*/ |
|
175
|
|
|
public function setArrayOfEntities($arrayOfEntities) |
|
176
|
|
|
{ |
|
177
|
|
|
$this->arrayOfEntities = $arrayOfEntities; |
|
178
|
|
|
} |
|
179
|
|
|
|
|
180
|
|
|
/** |
|
181
|
|
|
* @return \Smartbox\CoreBundle\Type\IntegerType[] |
|
182
|
|
|
*/ |
|
183
|
|
|
public function getArrayOfIntegers() |
|
184
|
|
|
{ |
|
185
|
|
|
return $this->arrayOfIntegers; |
|
186
|
|
|
} |
|
187
|
|
|
|
|
188
|
|
|
/** |
|
189
|
|
|
* @param \Smartbox\CoreBundle\Type\IntegerType[] $arrayOfIntegers |
|
190
|
|
|
*/ |
|
191
|
|
|
public function setArrayOfIntegers($arrayOfIntegers) |
|
192
|
|
|
{ |
|
193
|
|
|
$this->arrayOfIntegers = $arrayOfIntegers; |
|
194
|
|
|
} |
|
195
|
|
|
|
|
196
|
|
|
/** |
|
197
|
|
|
* @return \Smartbox\CoreBundle\Type\StringType[] |
|
198
|
|
|
*/ |
|
199
|
|
|
public function getArrayOfStrings() |
|
200
|
|
|
{ |
|
201
|
|
|
return $this->arrayOfStrings; |
|
202
|
|
|
} |
|
203
|
|
|
|
|
204
|
|
|
/** |
|
205
|
|
|
* @param \Smartbox\CoreBundle\Type\StringType[] $arrayOfStrings |
|
206
|
|
|
*/ |
|
207
|
|
|
public function setArrayOfStrings($arrayOfStrings) |
|
208
|
|
|
{ |
|
209
|
|
|
$this->arrayOfStrings = $arrayOfStrings; |
|
210
|
|
|
} |
|
211
|
|
|
|
|
212
|
|
|
/** |
|
213
|
|
|
* @return \Smartbox\CoreBundle\Type\DoubleType[] |
|
214
|
|
|
*/ |
|
215
|
|
|
public function getArrayOfDoubles() |
|
216
|
|
|
{ |
|
217
|
|
|
return $this->arrayOfDoubles; |
|
218
|
|
|
} |
|
219
|
|
|
|
|
220
|
|
|
/** |
|
221
|
|
|
* @param \Smartbox\CoreBundle\Type\DoubleType[] $arrayOfDoubles |
|
222
|
|
|
*/ |
|
223
|
|
|
public function setArrayOfDoubles($arrayOfDoubles) |
|
224
|
|
|
{ |
|
225
|
|
|
$this->arrayOfDoubles = $arrayOfDoubles; |
|
226
|
|
|
} |
|
227
|
|
|
|
|
228
|
|
|
/** |
|
229
|
|
|
* @return \Smartbox\CoreBundle\Type\Date[] |
|
230
|
|
|
*/ |
|
231
|
|
|
public function getArrayOfDates() |
|
232
|
|
|
{ |
|
233
|
|
|
return $this->arrayOfDates; |
|
234
|
|
|
} |
|
235
|
|
|
|
|
236
|
|
|
/** |
|
237
|
|
|
* @param \Smartbox\CoreBundle\Type\Date[] $arrayOfDates |
|
238
|
|
|
*/ |
|
239
|
|
|
public function setArrayOfDates($arrayOfDates) |
|
240
|
|
|
{ |
|
241
|
|
|
$this->arrayOfDates = $arrayOfDates; |
|
242
|
|
|
} |
|
243
|
|
|
|
|
244
|
|
|
/** |
|
245
|
|
|
* @return \DateTime[] |
|
246
|
|
|
*/ |
|
247
|
|
|
public function getArrayOfDateTimes() |
|
248
|
|
|
{ |
|
249
|
|
|
return $this->arrayOfDateTimes; |
|
250
|
|
|
} |
|
251
|
|
|
|
|
252
|
|
|
/** |
|
253
|
|
|
* @param \DateTime[] $arrayOfDateTimes |
|
254
|
|
|
*/ |
|
255
|
|
|
public function setArrayOfDateTimes(array $arrayOfDateTimes) |
|
256
|
|
|
{ |
|
257
|
|
|
$this->arrayOfDateTimes = $arrayOfDateTimes; |
|
258
|
|
|
} |
|
259
|
|
|
} |
|
260
|
|
|
|