id; } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } public function getSpouse() { return $this->spouse; } public function getFriends() { return $this->friends; } public function addFriend(CompanyPerson $friend) { if ( ! $this->friends) { $this->friends = new \Doctrine\Common\Collections\ArrayCollection; } if ( ! $this->friends->contains($friend)) { $this->friends->add($friend); $friend->addFriend($this); } } public function setSpouse(CompanyPerson $spouse) { if ($spouse !== $this->spouse) { $this->spouse = $spouse; $this->spouse->setSpouse($this); } } }