PluginProbe
404 Solution / 4.3.0
404 Solution v4.3.0
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / bootstrap.php

bootstrap.php in 404 Solution 4.3.0, at includes/bootstrap.php

53 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) {
4 exit;
5 }
6
7 require_once __DIR__ . '/bootstrap/CoreServiceRegistration.php';
8 require_once __DIR__ . '/bootstrap/DataServiceRegistration.php';
9 require_once __DIR__ . '/bootstrap/DomainServiceRegistration.php';
10 require_once __DIR__ . '/bootstrap/MatchingEngineServiceRegistration.php';
11 require_once __DIR__ . '/bootstrap/Abj404ServiceRegistrationContract.php';
12 require_once __DIR__ . '/bootstrap/RuntimeServiceRegistration.php';
13 require_once __DIR__ . '/bootstrap/LegacyInstanceResolver.php';
14 require_once __DIR__ . '/bootstrap/service-locator.php';
15
16 /**
17 * Bootstrap file for initializing the service container and registering services.
18 *
19 * This file keeps the entry points stable while layer-specific registration
20 * modules own the actual factory wiring.
21 */
22
23 /**
24 * Initialize all services in the dependency injection container.
25 *
26 * Services are registered with factory functions that define their dependencies.
27 * The container handles lazy instantiation and ensures each service is a singleton.
28 *
29 * @return void
30 */
31 function abj_404_solution_init_services() {
32 $container = ABJ_404_Solution_ServiceContainer::getInstance();
33
34 ABJ_404_Solution_CoreServiceRegistration::register($container);
35 ABJ_404_Solution_DataServiceRegistration::register($container);
36 ABJ_404_Solution_DomainServiceRegistration::register($container);
37 ABJ_404_Solution_MatchingEngineServiceRegistration::register($container);
38 ABJ_404_Solution_RuntimeServiceRegistration::register($container);
39 }
40
41 /**
42 * Backward compatibility function for accessing services.
43 *
44 * This allows existing code to continue working while we migrate
45 * to the container pattern. Eventually this can be removed.
46 *
47 * @param string $className The class name to get an instance of
48 * @return mixed The service instance
49 */
50 function abj_get_instance($className) {
51 return ABJ_404_Solution_LegacyInstanceResolver::resolve($className);
52 }
53