Please help me up, I’m a newbie with MVC , left alone Yii framework.
Where should I put a global public function? I dont want to put my getYesOrNo function, which basically returns an array of ‘yes’ and ‘no’ for dropdownlist, in every model which will be using it, and I’m not sure if I could mess with the classes in Yii folder.
The Yii Blog Tutorial uses a “Lookup” class as a string table that does the same thing as what you’re describing. It’s a decent way of handling this and saves you from hard-coding like the way you planned to.