PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
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 5 years ago Container.php 2 years ago
Container.php
113 lines
1 <?php
2
3 namespace AmeliaBooking\Infrastructure\Common;
4
5 use AmeliaBooking\Domain\Repository\User\UserRepositoryInterface;
6 use AmeliaBooking\Infrastructure\Connection;
7
8 /**
9 * Class Container
10 *
11 * @package AmeliaBooking\Infrastructure\Common
12 */
13 final class Container extends \Slim\Container
14 {
15 /**
16 * @return Connection
17 * @throws \Interop\Container\Exception\ContainerException
18 */
19 public function getDatabaseConnection()
20 {
21 return $this->get('app.connection');
22 }
23
24 /**
25 * @return UserRepositoryInterface
26 * @throws \Interop\Container\Exception\ContainerException
27 */
28 public function getUserRepository()
29 {
30 return $this->get('domain.users.repository');
31 }
32
33 /**
34 * Get the command bus
35 *
36 * @return mixed
37 * @throws \Interop\Container\Exception\ContainerException
38 */
39 public function getCommandBus()
40 {
41 return $this->get('command.bus');
42 }
43
44 /**
45 * Get the event bus
46 *
47 * @return mixed
48 * @throws \Interop\Container\Exception\ContainerException
49 */
50 public function getEventBus()
51 {
52 return $this->get('domain.event.bus');
53 }
54
55 /**
56 * Get the Permissions domain service
57 *
58 * @throws \Interop\Container\Exception\ContainerException
59 */
60 public function getPermissionsService()
61 {
62 return $this->get('domain.permissions.service');
63 }
64
65 /**
66 * Get the API Permissions domain service
67 *
68 * @throws \Interop\Container\Exception\ContainerException
69 */
70 public function getApiPermissionsService()
71 {
72 return $this->get('domain.api.permissions.service');
73 }
74
75 /**
76 * Get the API User application service
77 *
78 * @throws \Interop\Container\Exception\ContainerException
79 */
80 public function getApiUserApplicationService()
81 {
82 return $this->get('application.api.user.service');
83 }
84
85 /**
86 * Get the User application service
87 *
88 * @throws \Interop\Container\Exception\ContainerException
89 */
90 public function getUserApplicationService()
91 {
92 return $this->get('application.user.service');
93 }
94
95 /**
96 * @return mixed
97 * @throws \Interop\Container\Exception\ContainerException
98 */
99 public function getMailerService()
100 {
101 return $this->get('application.mailer');
102 }
103
104 /**
105 * @return mixed
106 * @throws \Interop\Container\Exception\ContainerException
107 */
108 public function getSettingsService()
109 {
110 return $this->get('domain.settings.service');
111 }
112 }
113