My objective is to use createUrl() function inside User model class. I notice createUrl() exists in CWebApplication and CController class.
How do I get instance of Cwebapplication or Controller in side a model class?
Is there a function like Yii::GetApplicationInstance?
Thank you very much!
(Maurizio Domba Cerin)
Of course there is… if you just took a look at any extension or module there would be a good chance you would saw it
Yii->app() - http://www.yiiframework.com/doc/api/1.1/YiiBase#app-detail