Jump to content

Combining Objects


linchat

Recommended Posts

Hi all,

 

Have a question and wandering how some of you, or what would be the best practice for this implementation.

 

I have three objects

 

Company

Categories

Product

 

 

Each of these objects are standalone objects, but at times, the three could be combined to create a complete product.

 

One way is:

 

categories extends company

product extends categories

 

THis will work, but this extended object just seems like over and it is not something I need. I wish something in php would allow me to creare a parent like this

 

class productComplete extends product, categories, company {}

 

But since php does not allow this, how would you design something like this? What is best implementation?

Link to comment
https://forums.phpfreaks.com/topic/96965-combining-objects/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.