-
Notifications
You must be signed in to change notification settings - Fork 1
/
container.php
95 lines (73 loc) · 3.22 KB
/
container.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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
declare(strict_types=1);
// Core
$container->add("Pdo", PDO::class)
->addArgument("mysql:dbname={$_ENV["DB_NAME"]};host={$_ENV["DB_HOST"]}")
->addArgument($_ENV["DB_USER"])
->addArgument($_ENV["DB_PASS"])
->addArgument([]);
$container->add("Database", CRM\Database\PdoDatabase::class)
->addArgument("Pdo");
// Contact
$container->add("ContactRepository", CRM\Contact\ContactRepository::class)
->addArgument("Database");
$container->add("ContactService", CRM\Contact\ContactService::class)
->addArgument("ContactRepository");
$container->add(CRM\Contact\ContactController::class)
->addArgument("ContactService");
// ContactStatus
$container->add("ContactStatusRepository", CRM\ContactStatus\ContactStatusRepository::class)
->addArgument("Database");
$container->add("ContactStatusService", CRM\ContactStatus\ContactStatusService::class)
->addArgument("ContactStatusRepository");
$container->add(CRM\ContactStatus\ContactStatusController::class)
->addArgument("ContactStatusService");
// Notes
$container->add("NotesRepository", CRM\Notes\NotesRepository::class)
->addArgument("Database");
$container->add("NotesService", CRM\Notes\NotesService::class)
->addArgument("NotesRepository");
$container->add(CRM\Notes\NotesController::class)
->addArgument("NotesService");
// Roles
$container->add("RolesRepository", CRM\Roles\RolesRepository::class)
->addArgument("Database");
$container->add("RolesService", CRM\Roles\RolesService::class)
->addArgument("RolesRepository");
$container->add(CRM\Roles\RolesController::class)
->addArgument("RolesService");
// TaskStatus
$container->add("TaskStatusRepository", CRM\TaskStatus\TaskStatusRepository::class)
->addArgument("Database");
$container->add("TaskStatusService", CRM\TaskStatus\TaskStatusService::class)
->addArgument("TaskStatusRepository");
$container->add(CRM\TaskStatus\TaskStatusController::class)
->addArgument("TaskStatusService");
// TodoDesc
$container->add("TodoDescRepository", CRM\TodoDesc\TodoDescRepository::class)
->addArgument("Database");
$container->add("TodoDescService", CRM\TodoDesc\TodoDescService::class)
->addArgument("TodoDescRepository");
$container->add(CRM\TodoDesc\TodoDescController::class)
->addArgument("TodoDescService");
// TodoType
$container->add("TodoTypeRepository", CRM\TodoType\TodoTypeRepository::class)
->addArgument("Database");
$container->add("TodoTypeService", CRM\TodoType\TodoTypeService::class)
->addArgument("TodoTypeRepository");
$container->add(CRM\TodoType\TodoTypeController::class)
->addArgument("TodoTypeService");
// UserStatus
$container->add("UserStatusRepository", CRM\UserStatus\UserStatusRepository::class)
->addArgument("Database");
$container->add("UserStatusService", CRM\UserStatus\UserStatusService::class)
->addArgument("UserStatusRepository");
$container->add(CRM\UserStatus\UserStatusController::class)
->addArgument("UserStatusService");
// Users
$container->add("UsersRepository", CRM\Users\UsersRepository::class)
->addArgument("Database");
$container->add("UsersService", CRM\Users\UsersService::class)
->addArgument("UsersRepository");
$container->add(CRM\Users\UsersController::class)
->addArgument("UsersService");