|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?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');
|