|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?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');
-
- $server_name = $_SERVER['SERVER_NAME'] ;
- Yii::setAlias('@domainName', (YII_ENV === 'dev') ? (($server_name == 'localhost') ? 'localhost' : 'laboiteapain-dev.net') : 'laboiteapain.net');
- Yii::setAlias('@baseUrl', ($server_name == 'localhost') ? '/laboiteapain/' : '/');
- Yii::setAlias('@baseUrlFrontend', (($server_name == 'localhost') ? '/frontend/web' : ''));
- Yii::setAlias('@baseUrlBackend', (($server_name == 'localhost') ? '/backend/web' : ''));
- Yii::setAlias('@baseUrlProducer', (($server_name == 'localhost') ? '/producer/web' : ''));
- Yii::setAlias('@frontendSubdomain', (($server_name == 'localhost') ? '' : 'www'));
- Yii::setAlias('@backendSubdomain', (($server_name == 'localhost') ? '' : 'admin'));
- Yii::setAlias('@producerSubdomain', (($server_name == '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('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');
|