products = new \Doctrine\Common\Collections\Collection; } public function getId() { return $this->id; } public function getPayment() { return $this->payment; } public function setPayment($payment) { $this->payment = $payment; } public function setCustomer(ECommerceCustomer $customer) { if ($this->customer !== $customer) { $this->customer = $customer; $customer->setCart($this); } } public function removeCustomer() { if ($this->customer !== null) { $customer = $this->customer; $this->customer = null; $customer->removeCart(); } } public function getCustomer() { return $this->customer; } public function getProducts() { return $this->products; } public function addProduct(ECommerceProduct $product) { $this->products[] = $product; } }