application.services.php
1 month ago
command.bus.php
2 years ago
container.php
1 month ago
domain.event.bus.php
1 year ago
domain.services.php
1 year ago
infrastructure.services.php
4 months ago
infrastructure.user.php
1 year ago
repositories.php
6 months ago
request.php
1 month ago
container.php
59 lines
| 1 | <?php |
| 2 | |
| 3 | use AmeliaBooking\Infrastructure\Common\Container; |
| 4 | use AmeliaBooking\Infrastructure\Connection; |
| 5 | |
| 6 | ########################################################################## |
| 7 | ########################################################################## |
| 8 | # App common |
| 9 | ########################################################################## |
| 10 | ########################################################################## |
| 11 | $entries['app.connection'] = function () { |
| 12 | global $wpdb; |
| 13 | |
| 14 | return new Connection($wpdb); |
| 15 | }; |
| 16 | |
| 17 | |
| 18 | ################ |
| 19 | # Repositories # |
| 20 | ################ |
| 21 | require 'repositories.php'; |
| 22 | |
| 23 | ############################ |
| 24 | # Currently logged in user # |
| 25 | ############################ |
| 26 | require 'infrastructure.user.php'; |
| 27 | |
| 28 | ################### |
| 29 | # Domain Services # |
| 30 | ################### |
| 31 | require 'domain.services.php'; |
| 32 | |
| 33 | ######################## |
| 34 | # Application Services # |
| 35 | ######################## |
| 36 | require 'application.services.php'; |
| 37 | |
| 38 | ######################## |
| 39 | # Infrastructure Services # |
| 40 | ######################## |
| 41 | require 'infrastructure.services.php'; |
| 42 | |
| 43 | ############### |
| 44 | # Command bus # |
| 45 | ############### |
| 46 | require 'command.bus.php'; |
| 47 | |
| 48 | #################### |
| 49 | # Domain event bus # |
| 50 | #################### |
| 51 | require 'domain.event.bus.php'; |
| 52 | |
| 53 | ###################### |
| 54 | # Request overriding # |
| 55 | ###################### |
| 56 | require 'request.php'; |
| 57 | |
| 58 | return new Container($entries); |
| 59 |