Revision #5 has been created by zaccaria on Oct 18, 2010, 4:11:27 PM with the memo:
added links to console and web application
« previous (#4) next (#6) »
Changes
Title
unchanged
Reading the doc
Category
unchanged
Tips
Yii version
unchanged
Tags
unchanged
doc
Content
changed
[...]
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()?[...]