|
- <?php
-
-
-
- Yii::setAlias('common', dirname(__DIR__));
- Yii::setAlias('frontend', dirname(dirname(__DIR__)) . '/frontend');
- Yii::setAlias('backend', dirname(dirname(__DIR__)) . '/backend');
- Yii::setAlias('console', dirname(dirname(__DIR__)) . '/console');
- Yii::setAlias('producer', dirname(dirname(__DIR__)) . '/producer');
-
- $serverName = $_SERVER['SERVER_NAME'] ;
-
- $domainName = '' ;
- if($serverName == 'localhost') {
- $domainName = 'localhost' ;
- }
- else {
- $domainName = (YII_ENV === 'dev' || YII_ENV === 'demo') ? 'opendistrib-'.YII_ENV.'.net' : 'opendistrib.net' ;
- }
-
- Yii::setAlias('@domainName', $domainName);
- Yii::setAlias('@baseUrl', ($serverName == 'localhost') ? '/distrib/' : '/');
- Yii::setAlias('@baseUrlFrontend', (($serverName == 'localhost') ? '/frontend/web' : ''));
- Yii::setAlias('@baseUrlBackend', (($serverName == 'localhost') ? '/backend/web' : ''));
- Yii::setAlias('@baseUrlProducer', (($serverName == 'localhost') ? '/producer/web' : ''));
- Yii::setAlias('@frontendSubdomain', (($serverName == 'localhost') ? '' : 'www'));
- Yii::setAlias('@backendSubdomain', (($serverName == 'localhost') ? '' : 'admin'));
- Yii::setAlias('@producerSubdomain', (($serverName == 'localhost') ? '' : 'producteurs'));
-
-
-
- Yii::$classMap['Import'] = Yii::getAlias('@common/exts/Import.php');
-
-
- Import::using('Yii');
- Import::using('yii\filters\*');
- Import::using('yii\data\*');
- Import::using('yii\db\*');
- Import::using('yii\behaviors\*');
- Import::using('yii\helpers\*');
- Import::using('yii\web\NotFoundHttpException');
- Import::using('yii\grid\*');
-
-
- Import::using('common\models\*');
- Import::using('frontend\models\*');
- Import::using('backend\models\*');
-
-
- Import::using('common\controllers\*');
- Import::using('frontend\controllers\*');
- Import::using('backend\controllers\*');
- Import::using('producer\controllers\*');
-
-
- Import::using('common\helpers\*');
-
-
- Import::using('common\components\*');
- Import::using('producer\components\*');
- Import::using('backend\components\*');
- Import::using('frontend\components\*');
-
-
- Import::using('kartik\mpdf\Pdf');
|