I am using the MVC concept (as per http://r.je/view-helpers.html) in my PHP project:
- Controller - processes user interaction;
- View - displays any data and or fields;
- Model - handles all business logic, including access to data access objects.
A front controller is instantiating the MVC triads. In this structure I need the View to display html select option lists that are populated from the database, along with any user fields the various domain objects require data from. I hope this is clear.
My question is: the View cannot ask the database for the data to populate the select option list, so what is the generic application flow to "pass" the View the required form data to correctly populate the required select option list?
NOTE: The View currently gets user data (in a Request object) from the Model, and any validation errors the View has asked the Model for.