articles = new ArrayCollection; $this->references = new ArrayCollection; $this->cars = new ArrayCollection; } public function getId() { return $this->id; } public function getUsername() { return $this->username; } public function addArticle(LegacyArticle $article) { $this->articles[] = $article; $article->setAuthor($this); } public function addReference($reference) { $this->references[] = $reference; } public function references() { return $this->references; } public function addCar(LegacyCar $car) { $this->cars[] = $car; $car->addUser($this); } public function getCars() { return $this->cars; } }