nettrinity
(Thanhvn Info)
1
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!
mdomba
(Maurizio Domba Cerin)
2
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