Adding common functions

Can any one tell me how to add common functions to all files.

As we include some files having certain common functions needed.

So how to include those functions using yii framework.

Should we use separate controller and model for this.

You can create a new class, put it in your components folder and then access the defined functions.




class MyFunctions

{


   public static function example() {}


}



And then anywhere inside of the framework:


MyFunctions::example();

Is this what you need?

Hey… Thanks a lot dude

Ya I think this will work.

Also check this:

http://www.yiiframework.com/doc/cookbook/31/