-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bootstrap.php
executable file
·39 lines (37 loc) · 1.21 KB
/
Bootstrap.php
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
<?php
namespace app\common;
use app\common\bots\SkypeBotService;
use app\common\bots\SkypeBotServiceInterface;
use app\common\mail\EmailSenderService;
use app\common\mail\EmailSenderServiceInterface;
use app\common\notification\NotificationService;
use app\common\notification\NotificationServiceInterface;
use app\common\service\ServiceRegistry;
use app\common\workflow\HandlerManager;
use app\common\workflow\HandlerManagerInterface;
use app\common\workflow\WorkflowManager;
use app\common\workflow\WorkflowManagerInterface;
use yii\base\BootstrapInterface;
/**
* Class Bootstrap
*
*
* @author Dzhamal Tayibov
*/
class Bootstrap implements BootstrapInterface
{
/**
* @inheritdoc
*/
public function bootstrap($app)
{
\Yii::$container->setSingletons([
WorkflowManagerInterface::class => WorkflowManager::class,
NotificationServiceInterface::class => NotificationService::class,
HandlerManagerInterface::class => HandlerManager::class,
SkypeBotServiceInterface::class => SkypeBotService::class,
EmailSenderServiceInterface::class => EmailSenderService::class,
'serviceRegistry' => ServiceRegistry::class,
]);
}
}