Where to put universal public function?

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.

Hello, please click on this Post

cheers!

Check this wiki article… it will give you some additional ideas for this kind of shortcut functions - http://www.yiiframework.com/wiki/31/use-shortcut-functions-to-reduce-typing

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.

Thank you guys for the tips!