Reading the doc

Comparing #4 with #5

Revision #5 was created by zaccaria zaccaria on Oct 18, 2010, 4:11:27 PM.

added links to console and web application

Content

[...]
In each point of your application code (view, controller, widget, model, module) you can call Yii:app().

This will give you the actual instance of CApplication that is running.

If you are developing a Web application, you will get an instance of
[CWebApplication](http://yiiframework.com/doc/api/1.1/CWebApplication "CWebApplication"), if you are developing a Console app, you will get an instance of [CConsoleApplication](http://yiiframework.com/doc/api/1.1/CConsoleApplication "CConsoleApplication").

This object is the one that is [configured](http://www.yiiframework.com/wiki/59/ "configuring Yii") through config/main.php, is the backbone of Yii. So in main.php you can configure each property you see, or add new compomentes that can be invoked via Yii::app()->myComponent.

### What can I do with this Yii::app()?
[...]