I have a PHP MVC application. My 'M' has Domain, Mapper and Factory layers, and these are accessed via a Service layer.
Often I need to generate a list of id/value pairs for a html select box. To date, I have put the queries in the Mappers and returned simple array, but this doesn't feel right. The Mappers are for storing and retrieving objects, right?
I don't really want the overhead of retrieving a collection of objects, only to discard most of their goodness to produce a simple array. I was thinking about moving the queries to a Service, perhaps even having a service dedicated to lookups? This would mean I have SQL code in two places in my application, but it feels neater.
Is there a better option?