*/ private $users; /** * @var Collection */ private $teams; public function __construct() { parent::__construct(); $this->users = new ArrayCollection(); $this->teams = new ArrayCollection(); } /** * @return Collection */ public function getUsers(): Collection { return $this->users; } public function addUser(User $user) { $this->users->add($user); return $this; } public function removeUser(User $user) { if ($this->users->contains($user)) { $this->users->remove($user); } return $this; } /** * @return Collection */ public function getTeams(): Collection { return $this->teams; } public function addTeam(Team $team) { $this->teams->add($team); return $this; } public function removeTeam(Team $team) { if ($this->teams->contains($team)) { $this->teams->remove($team); } return $this; } }