This repository has been archived by the owner on Jun 9, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
console.php
69 lines (64 loc) · 1.72 KB
/
console.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';
$config = [
'id' => 'my-project',
'name' => 'MyProject',
'basePath' => dirname(__DIR__) . '/src',
'bootstrap' => [],
'controllerNamespace' => 'app\commands',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'logger' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'__class' => yii\log\FileTarget::class,
'levels' => ['error', 'warning'],
],
],
],
'components' => [
'cache' => [
'__class' => yii\caching\Cache::class,
'handler' => [
'__class' => yii\caching\FileCache::class,
'keyPrefix' => 'my-project',
],
],
'mailer' => [
'__class' => yii\swiftmailer\Mailer::class,
],
'mutex' => [
'__class' => yii\mutex\FileMutex::class
],
'db' => $db,
'i18n' => [
'translations' => [
'*' => [
'__class' => yii\i18n\PhpMessageSource::class,
],
],
],
],
'params' => $params,
/*
'controllerMap' => [
'fixture' => [ // Fixture generation command line.
'class' => 'yii\faker\FixtureController',
],
],
*/
];
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
}
return $config;