Blame view

common/config/components.php 2.14 KB
d1f8bd40   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
  <?php
  
  /**
   * @author FilamentV <vortex.filament@gmail.com>
   * @copyright (c), Thread
   */
  return [
  //    'session' => [
  //        'class' => \yii\web\DbSession::class,
  //        Set the following if you want to use DB component other than
  //        'db' => 'coredb',
  //            To override default session table, set the following
  //        'sessionTable' => 'fv_session',
      /*
        CREATE TABLE fv_session (
        id CHAR(40) NOT NULL PRIMARY KEY,
        expire INTEGER,
        data BLOB
        )
       */
  //    ],
      'user' => [
          'class' => \yii\web\User::class,
          'identityClass' => \thread\modules\user\models\User::class,
          'enableAutoLogin' => false,
          'loginUrl' => ['/user/login']
      ],
      'languages' => [
          'class' => \thread\app\model\Languages::class,
          'languageModel' => \thread\modules\sys\models\Language::class,
      ],
      //MAIL
      'mail-carrier' => [
          'class' => \thread\modules\sys\modules\mailcarrier\components\MailCarrier::class,
          'pathToLayout' => '@frontend/mail/layouts',
          'pathToViews' => '@frontend/mail/views',
      ],
      'queue-mailer' => [
          'class' => \yii\queue\file\Queue::class,
          'path' => '@root/runtime/queue-mailer',
          'as log' => \yii\queue\LogBehavior::class
      ],
      'mailer' => [
          'class' => \yii\swiftmailer\Mailer::class,
          'useFileTransport' => false,
          'enableSwiftMailerLogging' => true,
          'transport' => [
              'class' => 'Swift_SmtpTransport',
          ],
      ],
      //
      'memcache' => [
          'class' => \yii\caching\MemCache::class,
          'servers' => [
              [
                  'host' => 'localhost',
                  'port' => 11211,
                  'weight' => 60,
              ]
          ]
      ],
      'rediscache' => [
          'class' => \yii\redis\Cache::class,
          'redis' => [
              'hostname' => 'localhost',
              'port' => 6379,
              'database' => 0,
          ]
      ],
  //    'session' => [
  //        'class' => \yii\redis\Session::class,
  //        'redis' => [
  //            'hostname' => 'localhost',
  //            'port' => 6379,
  //            'database' => 2,
  //        ]
  //    ],
  ];