Mr-Ice-Man
New Member
PHP: If I have a customer class, and the customer can have a car and an invoice, and I want to have separate car and invoice classes, what is the most efficient way of setting them up?So, I have three different classes:customer.class.phpcustomer_car.class.phpcustomer_invoice.class.phpWhat's the best way to set up the relationship/initialization between the three classes? A customer can have a car or an invoice. I want to keep the code separated so that its easy to maintain.\[code\]$customer = new customer();$car = $customer->newCar();$invoice = $customer->newInvoice();\[/code\]?