Difference between #4 and #6 of
Reading the doc

Changes

Title unchanged

Reading the doc

Category unchanged

Tips

Yii version unchanged

Tags unchanged

doc

Content changed

Reading the Yii doc ------------------ #### What to read: Almost all the information you need whilest working with yii areis written in the [Class Reference](http://www.yiiframework.com/doc/api/). The point is just to know how to find out themwhat you need. ForTo find this information, you have to understand what is Yii::app() and what is "this" in the context in wich you are.

#### Yii::app(): your best friend during programming
[...]
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()?
[...]
21 0
3 followers
Viewed: 12 801 times
Version: 1.1
Category: Tips
Tags: doc
Written by: zaccaria
Last updated by: Orteko
Created on: Oct 18, 2010
Last updated: 14 years ago
Update Article

Revisions

View all history