Guest User

Untitled

a guest
Feb 9th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. id - уникальный индекс приложения, который отличает его от других.
  2. basePath - корневая папка приложения
  3. bootstrap - массив компонент начальной загрузки
  4. language - язык приложения
  5. components - настройка компонентов приложения
  6. params - параметры приложения
  7. modules - подключение модулей приложения
  8.  
  9. <?php
  10.  
  11. $params = require(__DIR__ . '/params.php');
  12.  
  13. $config = [
  14. 'id' => 'basic',
  15. 'basePath' => dirname(__DIR__),
  16. 'bootstrap' => ['log'],
  17. 'components' => [
  18. 'request' => [
  19. // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  20. 'cookieValidationKey' => 'o8fpfN3qM5656545454545464646',
  21. ],
  22. 'cache' => [
  23. 'class' => 'yiicachingFileCache',
  24. ],
  25. 'user' => [
  26. 'identityClass' => 'appmodelsUser',
  27. 'enableAutoLogin' => true,
  28. ],
  29. 'errorHandler' => [
  30. 'errorAction' => 'site/error',
  31. ],
  32. 'mailer' => [
  33. 'class' => 'yiiswiftmailerMailer',
  34. // send all mails to a file by default. You have to set
  35. // 'useFileTransport' to false and configure a transport
  36. // for the mailer to send real emails.
  37. 'useFileTransport' => true,
  38. ],
  39. 'log' => [
  40. 'traceLevel' => YII_DEBUG ? 3 : 0,
  41. 'targets' => [
  42. [
  43. 'class' => 'yiilogFileTarget',
  44. 'levels' => ['error', 'warning'],
  45. ],
  46. ],
  47. ],
  48. 'db' => require(__DIR__ . '/db.php'),
  49. ],
  50. 'params' => $params,
  51. ];
  52.  
  53. if (YII_ENV_DEV) {
  54. // configuration adjustments for 'dev' environment
  55. $config['bootstrap'][] = 'debug';
  56. $config['modules']['debug'] = [
  57. 'class' => 'yiidebugModule',
  58. ];
  59.  
  60. $config['bootstrap'][] = 'gii';
  61. $config['modules']['gii'] = [
  62. 'class' => 'yiigiiModule',
  63. ];
  64. }
  65.  
  66. return $config;
Add Comment
Please, Sign In to add comment