2013-05-24 10:14:49 -04:00
|
|
|
<?php
|
2013-12-02 15:23:32 +04:00
|
|
|
|
2013-09-16 02:41:19 +04:00
|
|
|
$params = require(__DIR__ . '/params.php');
|
2013-12-02 15:23:32 +04:00
|
|
|
|
2013-10-18 07:30:41 +02:00
|
|
|
$config = [
|
2014-03-16 10:46:16 +06:00
|
|
|
'id' => 'basic',
|
|
|
|
'basePath' => dirname(__DIR__),
|
2014-04-10 15:05:01 -04:00
|
|
|
'bootstrap' => ['log'],
|
2014-03-16 10:46:16 +06:00
|
|
|
'components' => [
|
2014-07-19 14:56:31 -04:00
|
|
|
'request' => [
|
2014-07-19 15:39:03 -04:00
|
|
|
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
2014-09-03 10:02:31 -04:00
|
|
|
'cookieValidationKey' => '',
|
2014-07-19 14:56:31 -04:00
|
|
|
],
|
2014-03-16 10:46:16 +06:00
|
|
|
'cache' => [
|
|
|
|
'class' => 'yii\caching\FileCache',
|
|
|
|
],
|
|
|
|
'user' => [
|
|
|
|
'identityClass' => 'app\models\User',
|
|
|
|
'enableAutoLogin' => true,
|
|
|
|
],
|
|
|
|
'errorHandler' => [
|
|
|
|
'errorAction' => 'site/error',
|
|
|
|
],
|
2014-06-26 18:28:28 +04:00
|
|
|
'mailer' => [
|
2014-03-16 10:46:16 +06:00
|
|
|
'class' => 'yii\swiftmailer\Mailer',
|
2014-06-04 17:43:09 +02:00
|
|
|
// send all mails to a file by default. You have to set
|
|
|
|
// 'useFileTransport' to false and configure a transport
|
|
|
|
// for the mailer to send real emails.
|
2014-03-16 10:46:16 +06:00
|
|
|
'useFileTransport' => true,
|
|
|
|
],
|
|
|
|
'log' => [
|
|
|
|
'traceLevel' => YII_DEBUG ? 3 : 0,
|
|
|
|
'targets' => [
|
|
|
|
[
|
|
|
|
'class' => 'yii\log\FileTarget',
|
|
|
|
'levels' => ['error', 'warning'],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
2014-05-10 14:07:34 -04:00
|
|
|
'db' => require(__DIR__ . '/db.php'),
|
2014-08-17 18:55:24 +04:00
|
|
|
'urlManager' => [
|
|
|
|
'enablePrettyUrl' => true,
|
|
|
|
'showScriptName' => false,
|
|
|
|
],
|
2014-03-16 10:46:16 +06:00
|
|
|
],
|
|
|
|
'params' => $params,
|
2013-10-18 07:30:41 +02:00
|
|
|
];
|
2013-08-10 07:56:40 -04:00
|
|
|
|
2013-12-18 00:40:52 -05:00
|
|
|
if (YII_ENV_DEV) {
|
2014-03-16 10:46:16 +06:00
|
|
|
// configuration adjustments for 'dev' environment
|
2014-04-09 10:47:10 -04:00
|
|
|
$config['bootstrap'][] = 'debug';
|
2014-03-16 10:46:16 +06:00
|
|
|
$config['modules']['debug'] = 'yii\debug\Module';
|
2014-04-17 20:42:50 -04:00
|
|
|
|
|
|
|
$config['bootstrap'][] = 'gii';
|
2014-03-16 10:46:16 +06:00
|
|
|
$config['modules']['gii'] = 'yii\gii\Module';
|
2013-08-10 07:56:40 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return $config;
|