You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.1 KiB

  1. <?php
  2. $params = array_merge(
  3. require __DIR__ . '/../../common/config/params.php', require __DIR__ . '/../../common/config/params-local.php', require __DIR__ . '/params.php', require __DIR__ . '/params-local.php'
  4. );
  5. return [
  6. 'id' => 'backend',
  7. 'basePath' => dirname(__DIR__),
  8. 'controllerNamespace' => 'backend\controllers',
  9. 'bootstrap' => ['log'],
  10. 'modules' => [
  11. 'goods' => [
  12. 'class' => 'goods\Module',
  13. ],
  14. ],
  15. 'components' => [
  16. 'request' => [
  17. 'parsers' => [
  18. 'application/json' => 'yii\web\JsonParser',
  19. ],
  20. 'csrfParam' => '_csrf-api',
  21. ],
  22. 'user' => [
  23. 'identityClass' => 'backend\models\User',
  24. 'enableAutoLogin' => true,
  25. 'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
  26. ],
  27. 'session' => [
  28. // this is the name of the session cookie used for login on the app
  29. 'name' => 'backend',
  30. ],
  31. 'log' => [
  32. 'traceLevel' => YII_DEBUG ? 3 : 0,
  33. 'targets' => [
  34. [
  35. 'class' => 'yii\log\FileTarget',
  36. 'levels' => ['error', 'warning'],
  37. ],
  38. [
  39. 'class' => 'yii\log\FileTarget',
  40. 'levels' => ['info', 'error'],
  41. 'categories' => ['imagetest'],
  42. 'logFile' => '@app/runtime/logs/imagetest.log',
  43. 'logVars' => [],
  44. 'exportInterval' => 1,
  45. 'prefix' => function ($message) {
  46. }
  47. ],
  48. ],
  49. ],
  50. 'errorHandler' => [
  51. 'errorAction' => 'site/error',
  52. ],
  53. 'urlManager' => [
  54. 'enablePrettyUrl' => true,
  55. 'showScriptName' => false,
  56. 'rules' => [
  57. ],
  58. ],
  59. 'file' => ['class' => 'backend\logic\file\FileManager'],
  60. 'goods' => ['class' => 'goods\goods\logic\goods\GoodsManager'],
  61. ],
  62. // 'as access' => [
  63. // 'class' => 'iron\components\AccessControl',
  64. // ],
  65. 'params' => $params,
  66. ];