Imagine I've got a class defining an entity, such as a Product.
My framework is structured in toggable modules, such that some modules may extend the default class, i.e:
Module1lets me define aColoredProductModule2lets me define aShapedProduct
How would I define the relations between ColoredProduct, ShapedProduct and Product? How can I make sure that I can get a dynamic relation (toggle one or another without code intervention)?
Do I extend the class product? Do I refer to it on each subclass?
I'm using PHP. Thanks for your input.