Location of "Application::$components property" ?

In the Definitive Guide to Yii 2.0, on this page:


The following sentence is written:

[indent]"Application components can be any objects. You can register them by configuring the [color="#FF0000"]yii\base\Application::$components[/color] property in application configurations." [/indent]

The above sentence is followed by some example code.

However, I cannot find this path: yii\base\application within the Yii2 "advanced application template". I can find yii[color="#FF0000"]2[/color]\base\application.php, but the code it contains is not very similar to the code in the example. The only place where I can find code that is similar to the example code is in the [color="#FF0000"]common/config/main-local.php[/color] file.

Is this the file that the Definitive Guide is actually referring to? If so, why does it not say so? I mean, why does it not simply state that we should configure this file:

[indent]common/config/main-local.php ?[/indent]

Why does it instead advise configuring this:

[indent]"yii\base\Application::$components" ?[/indent]

Are the two somehow equivalent? If so, how?

For your reference, the "advanced application template" is described here:


By the way, I’m a Yii beginner, so please reply in simple terms.