Cannot Find Documentation For _App In Yiibase Class

Hello everyone!

I’m learning yii framework and have a quite simple question.

We know that Yii::app() returns a CApplication object. When I consult to Yii api documentation for static method app() I see something like:

public static function app() 


    return self::$_app; 


But the thing is I couldn’t find $_app inside yiiBase class. I’m wondering where does this guy $_app come from?

Thank in advanced!

attribute definition is in 75 line of

setting the value of this attribute is done like this:

front controller (index.php) has this line of code:

Yii::createWebApplication( $config )->run();

this creates CApplication instance and calls run() method. During initialisation of CApplication there is a call to


in CApplication::__construct()

and that is all.


Thank you!