Hi,
I've a question about objects, to explain it better an example:
A class named Car has an aggregation relation with a general class Parts. So in code the Car class contains a collection (array) of Parts.
Now the Parts class is used to derive more specific parts like Body, Engine and so on.
Now I would like to implement a method CreatePart (pName) in the Car class.
Question: Is there way in PHP to specify the exact class, meaning that the CreatePart should create specific part (Body, Engine) and not general Part.
What would be the best way to do this?
Regards,
iges.