-
Notifications
You must be signed in to change notification settings - Fork 0
/
container.php
149 lines (115 loc) · 5.13 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
140
141
142
143
144
145
146
147
148
<?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", Sakila\Database\PdoDatabase::class)
->addArgument("Pdo");
// Actor
$container->add("ActorRepository", Sakila\Actor\ActorRepository::class)
->addArgument("Database");
$container->add("ActorService", Sakila\Actor\ActorService::class)
->addArgument("ActorRepository");
$container->add(Sakila\Actor\ActorController::class)
->addArgument("ActorService");
// Address
$container->add("AddressRepository", Sakila\Address\AddressRepository::class)
->addArgument("Database");
$container->add("AddressService", Sakila\Address\AddressService::class)
->addArgument("AddressRepository");
$container->add(Sakila\Address\AddressController::class)
->addArgument("AddressService");
// Category
$container->add("CategoryRepository", Sakila\Category\CategoryRepository::class)
->addArgument("Database");
$container->add("CategoryService", Sakila\Category\CategoryService::class)
->addArgument("CategoryRepository");
$container->add(Sakila\Category\CategoryController::class)
->addArgument("CategoryService");
// City
$container->add("CityRepository", Sakila\City\CityRepository::class)
->addArgument("Database");
$container->add("CityService", Sakila\City\CityService::class)
->addArgument("CityRepository");
$container->add(Sakila\City\CityController::class)
->addArgument("CityService");
// Country
$container->add("CountryRepository", Sakila\Country\CountryRepository::class)
->addArgument("Database");
$container->add("CountryService", Sakila\Country\CountryService::class)
->addArgument("CountryRepository");
$container->add(Sakila\Country\CountryController::class)
->addArgument("CountryService");
// Customer
$container->add("CustomerRepository", Sakila\Customer\CustomerRepository::class)
->addArgument("Database");
$container->add("CustomerService", Sakila\Customer\CustomerService::class)
->addArgument("CustomerRepository");
$container->add(Sakila\Customer\CustomerController::class)
->addArgument("CustomerService");
// Film
$container->add("FilmRepository", Sakila\Film\FilmRepository::class)
->addArgument("Database");
$container->add("FilmService", Sakila\Film\FilmService::class)
->addArgument("FilmRepository");
$container->add(Sakila\Film\FilmController::class)
->addArgument("FilmService");
// FilmActor
$container->add("FilmActorRepository", Sakila\FilmActor\FilmActorRepository::class)
->addArgument("Database");
$container->add("FilmActorService", Sakila\FilmActor\FilmActorService::class)
->addArgument("FilmActorRepository");
$container->add(Sakila\FilmActor\FilmActorController::class)
->addArgument("FilmActorService");
// FilmCategory
$container->add("FilmCategoryRepository", Sakila\FilmCategory\FilmCategoryRepository::class)
->addArgument("Database");
$container->add("FilmCategoryService", Sakila\FilmCategory\FilmCategoryService::class)
->addArgument("FilmCategoryRepository");
$container->add(Sakila\FilmCategory\FilmCategoryController::class)
->addArgument("FilmCategoryService");
// FilmText
$container->add("FilmTextRepository", Sakila\FilmText\FilmTextRepository::class)
->addArgument("Database");
$container->add("FilmTextService", Sakila\FilmText\FilmTextService::class)
->addArgument("FilmTextRepository");
$container->add(Sakila\FilmText\FilmTextController::class)
->addArgument("FilmTextService");
// Inventory
$container->add("InventoryRepository", Sakila\Inventory\InventoryRepository::class)
->addArgument("Database");
$container->add("InventoryService", Sakila\Inventory\InventoryService::class)
->addArgument("InventoryRepository");
$container->add(Sakila\Inventory\InventoryController::class)
->addArgument("InventoryService");
// Payment
$container->add("PaymentRepository", Sakila\Payment\PaymentRepository::class)
->addArgument("Database");
$container->add("PaymentService", Sakila\Payment\PaymentService::class)
->addArgument("PaymentRepository");
$container->add(Sakila\Payment\PaymentController::class)
->addArgument("PaymentService");
// Rental
$container->add("RentalRepository", Sakila\Rental\RentalRepository::class)
->addArgument("Database");
$container->add("RentalService", Sakila\Rental\RentalService::class)
->addArgument("RentalRepository");
$container->add(Sakila\Rental\RentalController::class)
->addArgument("RentalService");
// Staff
$container->add("StaffRepository", Sakila\Staff\StaffRepository::class)
->addArgument("Database");
$container->add("StaffService", Sakila\Staff\StaffService::class)
->addArgument("StaffRepository");
$container->add(Sakila\Staff\StaffController::class)
->addArgument("StaffService");
// Store
$container->add("StoreRepository", Sakila\Store\StoreRepository::class)
->addArgument("Database");
$container->add("StoreService", Sakila\Store\StoreService::class)
->addArgument("StoreRepository");
$container->add(Sakila\Store\StoreController::class)
->addArgument("StoreService");