PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / trunk
Booking for Appointments and Events Calendar – Amelia vtrunk
2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Infrastructure / Common / Container.php
ameliabooking / src / Infrastructure / Common Last commit date
Exceptions 6 months ago AmeliaErrorHandler.php 1 month ago Container.php 1 month ago
Container.php
126 lines
1 <?php
2
3 namespace AmeliaBooking\Infrastructure\Common;
4
5 use AmeliaBooking\Domain\Repository\User\UserRepositoryInterface;
6 use AmeliaBooking\Domain\Services\Logger\LoggerInterface;
7 use AmeliaBooking\Infrastructure\Connection;
8 use AmeliaVendor\Psr\Container\ContainerInterface;
9 use Pimple\Container as PimpleContainer;
10
11 /**
12 * Class Container
13 *
14 * @package AmeliaBooking\Infrastructure\Common
15 */
16 final class Container extends PimpleContainer implements ContainerInterface
17 {
18 public function get(string $id)
19 {
20 return $this->offsetGet($id);
21 }
22
23 public function has(string $id): bool
24 {
25 return $this->offsetExists($id);
26 }
27
28 /**
29 * @return Connection
30 */
31 public function getDatabaseConnection()
32 {
33 return $this->get('app.connection');
34 }
35
36 /**
37 * @return UserRepositoryInterface
38 */
39 public function getUserRepository()
40 {
41 return $this->get('domain.users.repository');
42 }
43
44 /**
45 * Get the command bus
46 *
47 * @return mixed
48 */
49 public function getCommandBus()
50 {
51 return $this->get('command.bus');
52 }
53
54 /**
55 * Get the event bus
56 *
57 * @return mixed
58 */
59 public function getEventBus()
60 {
61 return $this->get('domain.event.bus');
62 }
63
64 /**
65 * Get the Permissions domain service
66 *
67 */
68 public function getPermissionsService()
69 {
70 return $this->get('domain.permissions.service');
71 }
72
73 /**
74 * Get the API Permissions domain service
75 *
76 */
77 public function getApiPermissionsService()
78 {
79 return $this->get('domain.api.permissions.service');
80 }
81
82 /**
83 * Get the API User application service
84 *
85 */
86 public function getApiUserApplicationService()
87 {
88 return $this->get('application.api.user.service');
89 }
90
91 /**
92 * Get the User application service
93 *
94 */
95 public function getUserApplicationService()
96 {
97 return $this->get('application.user.service');
98 }
99
100 /**
101 * Get the Logger service
102 *
103 * @return LoggerInterface
104 */
105 public function getLoggerService()
106 {
107 return $this->get('infrastructure.logger');
108 }
109
110 /**
111 * @return mixed
112 */
113 public function getMailerService()
114 {
115 return $this->get('application.mailer');
116 }
117
118 /**
119 * @return mixed
120 */
121 public function getSettingsService()
122 {
123 return $this->get('domain.settings.service');
124 }
125 }
126