console.php 804 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. // Merged web + local configuration is available in $web
  3. return [
  4. 'id' => 'console',
  5. 'basePath' => dirname(__DIR__),
  6. 'bootstrap' => ['log'],
  7. 'controllerNamespace' => 'app\console',
  8. 'extensions' => $web['extensions'],
  9. 'components' => [
  10. 'db' => $web['components']['db'],
  11. 'mongodb' => [
  12. 'class' => 'yii\mongodb\Connection',
  13. 'dsn' => 'mongodb://localhost:27017/local',
  14. ],
  15. 'log' => [
  16. 'targets' => [
  17. [
  18. 'class' => 'yii\log\FileTarget',
  19. 'levels' => ['error', 'warning'],
  20. ],
  21. ],
  22. ],
  23. 'example' => [
  24. 'class' => 'console\controllers\ExampleController',
  25. ],
  26. ],
  27. 'params' => $web['params'],
  28. ];