3 Answers
3

If you have a lot of get_by_* methods for a given model, then it does make sense to use the magic method as TaylorOtwell suggested. Actually, the __call method, as well as __get and __set are used frequently in other frameworks to make it easy to do exactly what you're talking about. Just remember CI will not play nice with the __call Magic method on the controller while mapping (but that won't effect the model).

Basic way I look at CMV in CI:

Libraries -- this is where the bulk of the "rendering logic" happens but generally should be control/model/view agnostic. Almost entirely stateless (my preference).

As to passing where clauses -- DB queries should almost be exclusively relegated to the model unless there is no other option or it would be excessively cumbersome to do so (but I would wonder if you couldn't refactor that).