Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id - уникальный индекс приложения, который отличает его от других.
- basePath - корневая папка приложения
- bootstrap - массив компонент начальной загрузки
- language - язык приложения
- components - настройка компонентов приложения
- params - параметры приложения
- modules - подключение модулей приложения
- <?php
- $params = require(__DIR__ . '/params.php');
- $config = [
- 'id' => 'basic',
- 'basePath' => dirname(__DIR__),
- 'bootstrap' => ['log'],
- 'components' => [
- 'request' => [
- // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
- 'cookieValidationKey' => 'o8fpfN3qM5656545454545464646',
- ],
- 'cache' => [
- 'class' => 'yiicachingFileCache',
- ],
- 'user' => [
- 'identityClass' => 'appmodelsUser',
- 'enableAutoLogin' => true,
- ],
- 'errorHandler' => [
- 'errorAction' => 'site/error',
- ],
- 'mailer' => [
- 'class' => 'yiiswiftmailerMailer',
- // 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' => 'yiilogFileTarget',
- 'levels' => ['error', 'warning'],
- ],
- ],
- ],
- 'db' => require(__DIR__ . '/db.php'),
- ],
- 'params' => $params,
- ];
- if (YII_ENV_DEV) {
- // configuration adjustments for 'dev' environment
- $config['bootstrap'][] = 'debug';
- $config['modules']['debug'] = [
- 'class' => 'yiidebugModule',
- ];
- $config['bootstrap'][] = 'gii';
- $config['modules']['gii'] = [
- 'class' => 'yiigiiModule',
- ];
- }
- return $config;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement