-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontainer.php
86 lines (66 loc) · 3.2 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
<?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", RealEstate\Database\PdoDatabase::class)
->addArgument("Pdo");
// Admin
$container->add("AdminRepository", RealEstate\Admin\AdminRepository::class)
->addArgument("Database");
$container->add("AdminService", RealEstate\Admin\AdminService::class)
->addArgument("AdminRepository");
$container->add(RealEstate\Admin\AdminController::class)
->addArgument("AdminService");
// Agents
$container->add("AgentsRepository", RealEstate\Agents\AgentsRepository::class)
->addArgument("Database");
$container->add("AgentsService", RealEstate\Agents\AgentsService::class)
->addArgument("AgentsRepository");
$container->add(RealEstate\Agents\AgentsController::class)
->addArgument("AgentsService");
// Appointments
$container->add("AppointmentsRepository", RealEstate\Appointments\AppointmentsRepository::class)
->addArgument("Database");
$container->add("AppointmentsService", RealEstate\Appointments\AppointmentsService::class)
->addArgument("AppointmentsRepository");
$container->add(RealEstate\Appointments\AppointmentsController::class)
->addArgument("AppointmentsService");
// Clients
$container->add("ClientsRepository", RealEstate\Clients\ClientsRepository::class)
->addArgument("Database");
$container->add("ClientsService", RealEstate\Clients\ClientsService::class)
->addArgument("ClientsRepository");
$container->add(RealEstate\Clients\ClientsController::class)
->addArgument("ClientsService");
// Comments
$container->add("CommentsRepository", RealEstate\Comments\CommentsRepository::class)
->addArgument("Database");
$container->add("CommentsService", RealEstate\Comments\CommentsService::class)
->addArgument("CommentsRepository");
$container->add(RealEstate\Comments\CommentsController::class)
->addArgument("CommentsService");
// Notifications
$container->add("NotificationsRepository", RealEstate\Notifications\NotificationsRepository::class)
->addArgument("Database");
$container->add("NotificationsService", RealEstate\Notifications\NotificationsService::class)
->addArgument("NotificationsRepository");
$container->add(RealEstate\Notifications\NotificationsController::class)
->addArgument("NotificationsService");
// Properties
$container->add("PropertiesRepository", RealEstate\Properties\PropertiesRepository::class)
->addArgument("Database");
$container->add("PropertiesService", RealEstate\Properties\PropertiesService::class)
->addArgument("PropertiesRepository");
$container->add(RealEstate\Properties\PropertiesController::class)
->addArgument("PropertiesService");
// PropertyImages
$container->add("PropertyImagesRepository", RealEstate\PropertyImages\PropertyImagesRepository::class)
->addArgument("Database");
$container->add("PropertyImagesService", RealEstate\PropertyImages\PropertyImagesService::class)
->addArgument("PropertyImagesRepository");
$container->add(RealEstate\PropertyImages\PropertyImagesController::class)
->addArgument("PropertyImagesService");