Q:

Yii framework: importing classes while in the config/main.php file

Trying to import a class while in config/main.php (before the Yii configuration is returned):
 //class LanguageSettings is placed directly in protected/components/LanguageSettings.php
 Yii::import('application.components.*');
 LanguageSettings::currentLanguage();

causes that fatal error: 
 Fatal error: Uncaught exception 'CException' with message 
 'Alias "application.components.*" is invalid. Make sure it points to an existing 
 directory or file.' in C:\xampp\htdocs\yii\framework\YiiBase.php:

Why ? Can Yii resolve the alias correctly before importing the configuration array ?

A:

Sorry, I do not think it will work because the basePath has not been set yet, therefore Yii cannot calculate where application.components.* is referring to.

