yii2-netdisk/config/console.php

62 lines
1.6 KiB
PHP
Raw Normal View History

2013-05-24 10:14:49 -04:00
<?php
$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';
2015-09-08 23:18:39 +02:00
$config = [
2014-03-16 10:46:16 +06:00
'id' => 'basic-console',
'basePath' => dirname(__DIR__),
2015-09-08 23:18:39 +02:00
'bootstrap' => ['log'],
2014-03-16 10:46:16 +06:00
'controllerNamespace' => 'app\commands',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
2018-02-23 18:57:48 +01:00
'@tests' => '@app/tests',
],
2014-03-16 10:46:16 +06:00
'components' => [
2024-03-05 13:32:12 +08:00
'authManager' => [
'class' => 'yii\rbac\DbManager',
// uncomment if you want to cache RBAC items hierarchy
// 'cache' => 'cache',
],
2014-03-16 10:46:16 +06:00
'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 07:30:41 +02:00
];
2015-09-08 23:18:39 +02:00
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
2022-10-13 22:19:53 +02: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-08 23:18:39 +02:00
}
return $config;