id; } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } public function setCart(ECommerceCart $cart) { if ($this->cart !== $cart) { $this->cart = $cart; $cart->setCustomer($this); } } /* Does not properly maintain the bidirectional association! */ public function brokenSetCart(ECommerceCart $cart) { $this->cart = $cart; } public function getCart() { return $this->cart; } public function removeCart() { if ($this->cart !== null) { $cart = $this->cart; $this->cart = null; $cart->removeCustomer(); } } public function setMentor(ECommerceCustomer $mentor) { $this->mentor = $mentor; } public function removeMentor() { $this->mentor = null; } public function getMentor() { return $this->mentor; } }