main.php 833 B

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