yiisoft/yii — pull request #1891 by hijarian (2012-12-26 12:21:59+00:00)
Title: Improved understandability of the model template

I propose the following improvements in the default Gii template for model:

1. Auxiliary appendixes which are `model` and `getDbConnection` should be in very bottom of the model class and not in the very top, because on top of class definition should reside the most important features, which here undoubtedly are `tableName`, `rules` and `relations`.
2. Docblock for `search` method includes the explanations about it, because it's not immediately clear for a newcomer why this method exists and how it should be used.

By the way, this `search` method is a clear violation of single responsibility principle anyway, because it forces a model to search for set of other models of the same class, and ActiveRecord is not about it.