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.php
customer_car.class.php
customer_invoice.class.php
What'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.
$customer = new customer();
$car = $customer->newCar();
$invoice = $customer->newInvoice();
?