Mistake in documentation

Yii::app() does not return CApplication object, but CWebApplication. This misstake is everywhere (either in online Class Reference or off-line CHM Class Reference) and, truly, I am hesitate whether I am right or not, but, using Yii::app() we can access “request” property as well ass getRequest() method… Both of them are not members of CApplication class. I have spend a lot of time to investigate how does Yii Framework works and always was stucking at this place… Why do we use Yii::app()->request while we have no such a property in CApplication? :)

Please, fix it if it is really a mistake.

Regards.

Yii::app() does return CApplication in the sense that CWebApplication extends from CApplication. (Unless you’re working on a command-line application.)

Hence it is possible for it to have getRequest() method. Due to proper magic methods, obtaining request object property will give you the return value of getRequest().