-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontainer.php
77 lines (59 loc) · 2.65 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
<?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", VetClinic\Database\PdoDatabase::class)
->addArgument("Pdo");
// Vets
$container->add("VetsRepository", VetClinic\Vets\VetsRepository::class)
->addArgument("Database");
$container->add("VetsService", VetClinic\Vets\VetsService::class)
->addArgument("VetsRepository");
$container->add(VetClinic\Vets\VetsController::class)
->addArgument("VetsService");
// Specialties
$container->add("SpecialtiesRepository", VetClinic\Specialties\SpecialtiesRepository::class)
->addArgument("Database");
$container->add("SpecialtiesService", VetClinic\Specialties\SpecialtiesService::class)
->addArgument("SpecialtiesRepository");
$container->add(VetClinic\Specialties\SpecialtiesController::class)
->addArgument("SpecialtiesService");
// VetSpecialties
$container->add("VetSpecialtiesRepository", VetClinic\VetSpecialties\VetSpecialtiesRepository::class)
->addArgument("Database");
$container->add("VetSpecialtiesService", VetClinic\VetSpecialties\VetSpecialtiesService::class)
->addArgument("VetSpecialtiesRepository");
$container->add(VetClinic\VetSpecialties\VetSpecialtiesController::class)
->addArgument("VetSpecialtiesService");
// Types
$container->add("TypesRepository", VetClinic\Types\TypesRepository::class)
->addArgument("Database");
$container->add("TypesService", VetClinic\Types\TypesService::class)
->addArgument("TypesRepository");
$container->add(VetClinic\Types\TypesController::class)
->addArgument("TypesService");
// Owners
$container->add("OwnersRepository", VetClinic\Owners\OwnersRepository::class)
->addArgument("Database");
$container->add("OwnersService", VetClinic\Owners\OwnersService::class)
->addArgument("OwnersRepository");
$container->add(VetClinic\Owners\OwnersController::class)
->addArgument("OwnersService");
// Pets
$container->add("PetsRepository", VetClinic\Pets\PetsRepository::class)
->addArgument("Database");
$container->add("PetsService", VetClinic\Pets\PetsService::class)
->addArgument("PetsRepository");
$container->add(VetClinic\Pets\PetsController::class)
->addArgument("PetsService");
// Visits
$container->add("VisitsRepository", VetClinic\Visits\VisitsRepository::class)
->addArgument("Database");
$container->add("VisitsService", VetClinic\Visits\VisitsService::class)
->addArgument("VisitsRepository");
$container->add(VetClinic\Visits\VisitsController::class)
->addArgument("VisitsService");