1 | <?php |
||
16 | class Car { |
||
17 | /** |
||
18 | * @ORM\Id |
||
19 | * @ORM\Column(type="integer") |
||
20 | * @ORM\GeneratedValue(strategy="AUTO") |
||
21 | * @JMS\Type("integer") |
||
22 | */ |
||
23 | protected $id; |
||
24 | |||
25 | /** |
||
26 | * @ORM\Column(type="string") |
||
27 | * @JMS\Type("string") |
||
28 | */ |
||
29 | protected $name; |
||
30 | |||
31 | /** |
||
32 | * @ORM\Column(type="string", name="plate_number") |
||
33 | * @JMS\Type("string") |
||
34 | */ |
||
35 | protected $plateNumber; |
||
36 | |||
37 | /** |
||
38 | * @ORM\Column(type="string", nullable=true) |
||
39 | * @JMS\Type("string") |
||
40 | * @JMS\Groups({"post"}) |
||
41 | */ |
||
42 | protected $password; |
||
43 | |||
44 | /** |
||
45 | * @ORM\ManyToOne(targetEntity="Test\TestBundle\Entity\CarOwner", inversedBy="cars", cascade={"persist"}) |
||
46 | * @ORM\JoinColumn(name="car_owner_id", referencedColumnName="id") |
||
47 | * @JMS\Type("Test\TestBundle\Entity\CarOwner") |
||
48 | */ |
||
49 | protected $carOwner; |
||
50 | |||
51 | /** |
||
52 | * @ORM\ManyToOne(targetEntity="Test\TestBundle\Entity\Car", inversedBy="relatedCars", cascade={"persist"}) |
||
53 | * @ORM\JoinColumn(name="related_to_id", referencedColumnName="id") |
||
54 | * @JMS\Type("Test\TestBundle\Entity\Car") |
||
55 | */ |
||
56 | protected $relatedTo; |
||
57 | |||
58 | /** |
||
59 | * @ORM\OneToMany(targetEntity="Test\TestBundle\Entity\Car", mappedBy="relatedTo", cascade={"persist"}) |
||
60 | * @JMS\Type("ArrayCollection<Test\TestBundle\Entity\Car>") |
||
61 | */ |
||
62 | protected $relatedCars; |
||
63 | |||
64 | /** |
||
65 | * @param mixed $id |
||
66 | * |
||
67 | * @return Car |
||
68 | */ |
||
69 | 5 | public function setId($id) |
|
75 | |||
76 | /** |
||
77 | * @return mixed |
||
78 | */ |
||
79 | 16 | public function getId() |
|
83 | |||
84 | /** |
||
85 | * @param mixed $name |
||
86 | * |
||
87 | * @return Car |
||
88 | */ |
||
89 | 27 | public function setName($name) |
|
95 | |||
96 | /** |
||
97 | * @return mixed |
||
98 | */ |
||
99 | 4 | public function getName() |
|
103 | |||
104 | /** |
||
105 | * @param mixed $plateNumber |
||
106 | * |
||
107 | * @return Car |
||
108 | */ |
||
109 | 27 | public function setPlateNumber($plateNumber) |
|
115 | |||
116 | /** |
||
117 | * @return mixed |
||
118 | */ |
||
119 | 4 | public function getPlateNumber() |
|
123 | |||
124 | /** |
||
125 | * @param mixed $password |
||
126 | * |
||
127 | * @return Car |
||
128 | */ |
||
129 | public function setPassword($password) |
||
135 | |||
136 | /** |
||
137 | * @return mixed |
||
138 | */ |
||
139 | 1 | public function getPassword() |
|
143 | |||
144 | /** |
||
145 | * Set carOwner |
||
146 | * |
||
147 | * @param CarOwner $carOwner |
||
148 | * @return Car |
||
149 | */ |
||
150 | 10 | public function setCarOwner(CarOwner $carOwner = null) |
|
156 | |||
157 | /** |
||
158 | * Get carOwner |
||
159 | * |
||
160 | * @return CarOwner |
||
161 | */ |
||
162 | 8 | public function getCarOwner() |
|
166 | /** |
||
167 | * Constructor |
||
168 | */ |
||
169 | 27 | public function __construct() |
|
173 | |||
174 | /** |
||
175 | * Add relatedCars |
||
176 | * |
||
177 | * @param \Test\TestBundle\Entity\Car $relatedCars |
||
178 | * @return Car |
||
179 | */ |
||
180 | 27 | public function addRelatedCar(\Test\TestBundle\Entity\Car $relatedCars) |
|
186 | |||
187 | /** |
||
188 | * Remove relatedCars |
||
189 | * |
||
190 | * @param \Test\TestBundle\Entity\Car $relatedCars |
||
191 | */ |
||
192 | public function removeRelatedCar(\Test\TestBundle\Entity\Car $relatedCars) |
||
196 | |||
197 | /** |
||
198 | * Get relatedCars |
||
199 | * |
||
200 | * @return \Doctrine\Common\Collections\Collection |
||
201 | */ |
||
202 | 1 | public function getRelatedCars() |
|
206 | |||
207 | /** |
||
208 | * Set relatedTo |
||
209 | * |
||
210 | * @param \Test\TestBundle\Entity\Car $relatedTo |
||
211 | * @return Car |
||
212 | */ |
||
213 | public function setRelatedTo(\Test\TestBundle\Entity\Car $relatedTo = null) |
||
219 | |||
220 | /** |
||
221 | * Get relatedTo |
||
222 | * |
||
223 | * @return \Test\TestBundle\Entity\Car |
||
224 | */ |
||
225 | public function getRelatedTo() |
||
229 | |||
230 | public function mergeRelatedCars(ArrayCollection $list) { |
||
233 | } |