main.php 815 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. return array(
  3. 'id' => 'bootstrap',
  4. 'basePath' => dirname(__DIR__),
  5. 'preload' => array('log'),
  6. 'controllerNamespace' => 'app\controllers',
  7. 'modules' => array(
  8. // 'debug' => array(
  9. // 'class' => 'yii\debug\Module',
  10. // )
  11. ),
  12. 'components' => array(
  13. 'cache' => array(
  14. 'class' => 'yii\caching\FileCache',
  15. ),
  16. 'user' => array(
  17. 'class' => 'yii\web\User',
  18. 'identityClass' => 'app\models\User',
  19. ),
  20. 'assetManager' => array(
  21. 'bundles' => require(__DIR__ . '/assets.php'),
  22. ),
  23. 'log' => array(
  24. 'class' => 'yii\logging\Router',
  25. 'targets' => array(
  26. array(
  27. 'class' => 'yii\logging\FileTarget',
  28. 'levels' => array('error', 'warning'),
  29. ),
  30. // array(
  31. // 'class' => 'yii\logging\DebugTarget',
  32. // )
  33. ),
  34. ),
  35. ),
  36. 'params' => require(__DIR__ . '/params.php'),
  37. );