-
Notifications
You must be signed in to change notification settings - Fork 0
/
container.php
140 lines (108 loc) · 5.47 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?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", Northwind\Database\PdoDatabase::class)
->addArgument("Pdo");
// Categories
$container->add("CategoriesRepository", Northwind\Categories\CategoriesRepository::class)
->addArgument("Database");
$container->add("CategoriesService", Northwind\Categories\CategoriesService::class)
->addArgument("CategoriesRepository");
$container->add(Northwind\Categories\CategoriesController::class)
->addArgument("CategoriesService");
// CustomerDemographics
$container->add("CustomerDemographicsRepository", Northwind\CustomerDemographics\CustomerDemographicsRepository::class)
->addArgument("Database");
$container->add("CustomerDemographicsService", Northwind\CustomerDemographics\CustomerDemographicsService::class)
->addArgument("CustomerDemographicsRepository");
$container->add(Northwind\CustomerDemographics\CustomerDemographicsController::class)
->addArgument("CustomerDemographicsService");
// Customers
$container->add("CustomersRepository", Northwind\Customers\CustomersRepository::class)
->addArgument("Database");
$container->add("CustomersService", Northwind\Customers\CustomersService::class)
->addArgument("CustomersRepository");
$container->add(Northwind\Customers\CustomersController::class)
->addArgument("CustomersService");
// CustomerDemo
$container->add("CustomerDemoRepository", Northwind\CustomerDemo\CustomerDemoRepository::class)
->addArgument("Database");
$container->add("CustomerDemoService", Northwind\CustomerDemo\CustomerDemoService::class)
->addArgument("CustomerDemoRepository");
$container->add(Northwind\CustomerDemo\CustomerDemoController::class)
->addArgument("CustomerDemoService");
// Employees
$container->add("EmployeesRepository", Northwind\Employees\EmployeesRepository::class)
->addArgument("Database");
$container->add("EmployeesService", Northwind\Employees\EmployeesService::class)
->addArgument("EmployeesRepository");
$container->add(Northwind\Employees\EmployeesController::class)
->addArgument("EmployeesService");
// Suppliers
$container->add("SuppliersRepository", Northwind\Suppliers\SuppliersRepository::class)
->addArgument("Database");
$container->add("SuppliersService", Northwind\Suppliers\SuppliersService::class)
->addArgument("SuppliersRepository");
$container->add(Northwind\Suppliers\SuppliersController::class)
->addArgument("SuppliersService");
// Products
$container->add("ProductsRepository", Northwind\Products\ProductsRepository::class)
->addArgument("Database");
$container->add("ProductsService", Northwind\Products\ProductsService::class)
->addArgument("ProductsRepository");
$container->add(Northwind\Products\ProductsController::class)
->addArgument("ProductsService");
// Region
$container->add("RegionRepository", Northwind\Region\RegionRepository::class)
->addArgument("Database");
$container->add("RegionService", Northwind\Region\RegionService::class)
->addArgument("RegionRepository");
$container->add(Northwind\Region\RegionController::class)
->addArgument("RegionService");
// Shippers
$container->add("ShippersRepository", Northwind\Shippers\ShippersRepository::class)
->addArgument("Database");
$container->add("ShippersService", Northwind\Shippers\ShippersService::class)
->addArgument("ShippersRepository");
$container->add(Northwind\Shippers\ShippersController::class)
->addArgument("ShippersService");
// Orders
$container->add("OrdersRepository", Northwind\Orders\OrdersRepository::class)
->addArgument("Database");
$container->add("OrdersService", Northwind\Orders\OrdersService::class)
->addArgument("OrdersRepository");
$container->add(Northwind\Orders\OrdersController::class)
->addArgument("OrdersService");
// Territories
$container->add("TerritoriesRepository", Northwind\Territories\TerritoriesRepository::class)
->addArgument("Database");
$container->add("TerritoriesService", Northwind\Territories\TerritoriesService::class)
->addArgument("TerritoriesRepository");
$container->add(Northwind\Territories\TerritoriesController::class)
->addArgument("TerritoriesService");
// EmployeeTerritories
$container->add("EmployeeTerritoriesRepository", Northwind\EmployeeTerritories\EmployeeTerritoriesRepository::class)
->addArgument("Database");
$container->add("EmployeeTerritoriesService", Northwind\EmployeeTerritories\EmployeeTerritoriesService::class)
->addArgument("EmployeeTerritoriesRepository");
$container->add(Northwind\EmployeeTerritories\EmployeeTerritoriesController::class)
->addArgument("EmployeeTerritoriesService");
// OrderDetails
$container->add("OrderDetailsRepository", Northwind\OrderDetails\OrderDetailsRepository::class)
->addArgument("Database");
$container->add("OrderDetailsService", Northwind\OrderDetails\OrderDetailsService::class)
->addArgument("OrderDetailsRepository");
$container->add(Northwind\OrderDetails\OrderDetailsController::class)
->addArgument("OrderDetailsService");
// UsStates
$container->add("UsStatesRepository", Northwind\UsStates\UsStatesRepository::class)
->addArgument("Database");
$container->add("UsStatesService", Northwind\UsStates\UsStatesService::class)
->addArgument("UsStatesRepository");
$container->add(Northwind\UsStates\UsStatesController::class)
->addArgument("UsStatesService");