I'm just wondering, I'm not an expert on MVC but have been shifting our code towards a better MVC structure on the Zend Framework over the past few years. I basically have different models handling different sets of logic for different entities in the database. For example, a Product model, and a Customer model, etc.
Is it OK for my Product model to instatiate a Customer model, so that it can use some of the Customer functions? OR is this the job of a controller, to call the relevant functions of Customer, and pass the results to the Product? Let's say the Product needs to know if a Customer has certain records within it, so that the Product can decide on the correct data to return to the controller.
I am just curious on the 'best way'. I would want to instatiate a "model within a model" since the logic is needed from different controllers which call the same Product model function.
Many thanks!