Created
August 6, 2014 12:28
-
-
Save tmsnvd/f59bc8b20cd4684a2a6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$params = require(__DIR__ . '/params.php'); | |
$config = [ | |
'id' => 'test', | |
'basePath' => dirname(__DIR__), | |
'bootstrap' => ['log'], | |
'language' => 'lt-LT', | |
'components' => [ | |
'cache' => [ | |
//'class' => 'yii\caching\FileCache', | |
'class' => 'yii\caching\MemCache', | |
'servers' => [ | |
[ | |
'host' => 'localhost', | |
'port' => 11211, | |
'weight' => 100, | |
] | |
] | |
], | |
'i18n' => [ | |
'translations' => [ | |
'app*' => [ | |
'class' => 'yii\i18n\PhpMessageSource', | |
'basePath' => '@app/messages', | |
'sourceLanguage' => 'en_US', | |
'fileMap' => [ | |
'app' => 'app.php', | |
'app/error' => 'error.php', | |
], | |
], | |
'mail' => [ | |
'class' => 'yii\i18n\PhpMessageSource', | |
'basePath' => '@app/messages', | |
'sourceLanguage' => 'en_US', | |
'fileMap' => [ | |
'mail' => 'mail.php' | |
], | |
], | |
], | |
], | |
'assetManager' => array( | |
//'linkAssets' => true, | |
'forceCopy' => true, | |
'bundles' => [ | |
'yii\bootstrap\BootstrapAsset' => [ | |
'sourcePath' => null, | |
'css' => ['css/bootstrap.min.css'] | |
], | |
] | |
), | |
'user' => [ | |
'identityClass' => 'app\models\User', | |
'enableAutoLogin' => true, | |
], | |
'request' => array( | |
'cookieValidationKey' => 'TARA1245%^&%^@#$', | |
'enableCsrfValidation' => true, | |
'enableCookieValidation' => true, | |
), | |
'errorHandler' => [ | |
'errorAction' => 'site/error', | |
], | |
'mailer' => [ | |
'class' => 'yii\swiftmailer\Mailer', | |
// 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. | |
'useFileTransport' => true, | |
], | |
'log' => [ | |
'traceLevel' => YII_DEBUG ? 3 : 0, | |
'targets' => [ | |
[ | |
'class' => 'yii\log\FileTarget', | |
'levels' => ['error', 'warning'], | |
], | |
], | |
], | |
'urlManager' => [ | |
'enablePrettyUrl' => true, | |
'showScriptName' => false | |
], | |
'db' => require(__DIR__ . '/db.php'), | |
], | |
'params' => $params, | |
]; | |
if (YII_ENV_DEV) { | |
// configuration adjustments for 'dev' environment | |
$config['bootstrap'][] = 'debug'; | |
$config['modules']['debug'] = [ | |
'class' => 'yii\debug\Module', | |
'allowedIPs' => ['127.0.0.1', '::1', '10.0.2.2'], | |
]; | |
$config['bootstrap'][] = 'gii'; | |
$config['modules']['gii'] = [ | |
'class' => 'yii\gii\Module', | |
'allowedIPs' => ['127.0.0.1', '::1', '10.0.2.2'], | |
]; | |
} | |
return $config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment