I should note that I am using the Zend Framework. Although this should not affect the specific answer, it means that there are several places where I can implement my next method (action assistant, controller, etc.).
The problem is that I have a buildOptions () and parseOptions () method that takes $ _GET / $ _ POST variables based on the tag and builds the rules that are then used in select select. An example would be: modelSort = id & modelOrder = asc
The "model" in the above obviously refers to a specific model, and it is used as a "tag", so I can, for example, also have model2Sort and model2Order so that there is no conflict between the parameters.
However, the problem I am facing right now is where do these methods go? Usually they deal with query parameters. I read a lot about a thick model, a thin controller. If it will be in an abstract model. I thought that if that were the case, I would do something like:
(note, I know that I would not call it that directly. The method will be used by child classes)
$ abstractModel-> buildOptions ($ Params);
Where "params" can be anything, for example, the request parameters $ _GET or $ _POST:
$ abstractModel-> buildOptions ($ _ GET);
Now, from what I see, the model does not inherit the processing of query variables, but the parameters passed to this method.
Advice? Where does this method belong? Model, controller?
In particular, on Zend, should it be an action helper, a plugin, in an abstract model?
Appreciate any advice.