2013-05-24 22:14:49 +08:00
|
|
|
<?php
|
2014-01-04 05:16:05 +08:00
|
|
|
|
2017-08-08 04:46:37 +08:00
|
|
|
$params = require __DIR__ . '/params.php';
|
|
|
|
$db = require __DIR__ . '/db.php';
|
2014-01-04 06:28:33 +08:00
|
|
|
|
2015-09-09 05:18:39 +08:00
|
|
|
$config = [
|
2014-03-16 12:46:16 +08:00
|
|
|
'id' => 'basic-console',
|
|
|
|
'basePath' => dirname(__DIR__),
|
2015-09-09 05:18:39 +08:00
|
|
|
'bootstrap' => ['log'],
|
2014-03-16 12:46:16 +08:00
|
|
|
'controllerNamespace' => 'app\commands',
|
2017-11-07 20:29:58 +08:00
|
|
|
'aliases' => [
|
|
|
|
'@bower' => '@vendor/bower-asset',
|
|
|
|
'@npm' => '@vendor/npm-asset',
|
2018-02-24 01:57:48 +08:00
|
|
|
'@tests' => '@app/tests',
|
2017-11-07 20:29:58 +08:00
|
|
|
],
|
2014-03-16 12:46:16 +08:00
|
|
|
'components' => [
|
|
|
|
'cache' => [
|
|
|
|
'class' => 'yii\caching\FileCache',
|
|
|
|
],
|
|
|
|
'log' => [
|
|
|
|
'targets' => [
|
|
|
|
[
|
|
|
|
'class' => 'yii\log\FileTarget',
|
|
|
|
'levels' => ['error', 'warning'],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'db' => $db,
|
|
|
|
],
|
|
|
|
'params' => $params,
|
2015-10-21 09:07:07 +08:00
|
|
|
/*
|
|
|
|
'controllerMap' => [
|
|
|
|
'fixture' => [ // Fixture generation command line.
|
|
|
|
'class' => 'yii\faker\FixtureController',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
*/
|
2013-10-18 13:30:41 +08:00
|
|
|
];
|
2015-09-09 05:18:39 +08:00
|
|
|
|
|
|
|
if (YII_ENV_DEV) {
|
|
|
|
// configuration adjustments for 'dev' environment
|
|
|
|
$config['bootstrap'][] = 'gii';
|
|
|
|
$config['modules']['gii'] = [
|
|
|
|
'class' => 'yii\gii\Module',
|
|
|
|
];
|
2022-10-14 04:19:53 +08:00
|
|
|
// configuration adjustments for 'dev' environment
|
|
|
|
// requires version `2.1.21` of yii2-debug module
|
|
|
|
$config['bootstrap'][] = 'debug';
|
|
|
|
$config['modules']['debug'] = [
|
|
|
|
'class' => 'yii\debug\Module',
|
|
|
|
// uncomment the following to add your IP if you are not connecting from localhost.
|
|
|
|
//'allowedIPs' => ['127.0.0.1', '::1'],
|
|
|
|
];
|
2015-09-09 05:18:39 +08:00
|
|
|
}
|
2015-09-11 21:16:28 +08:00
|
|
|
|
|
|
|
return $config;
|