yii2-netdisk/config/console.php

46 lines
1.0 KiB
PHP
Raw Normal View History

2013-05-24 22:14:49 +08:00
<?php
Yii::setAlias('@tests', dirname(__DIR__) . '/tests/codeception');
$params = require(__DIR__ . '/params.php');
$db = require(__DIR__ . '/db.php');
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',
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'db' => $db,
],
'params' => $params,
/*
'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',
];
}
return $config;