service_loader
class service_loader implements service_loader_interface
| internal |
Service Loader.
Responsible for the "Auto-Discovery" of services. It scans specific directories and registers found classes into the Dependency Injection Container. Automatically scans folders and registers VALID services into the DI Container.
It uses a "Convention over Configuration" approach:
- It scans the
frameworkandextensionsdirectories. - It ignores specific infrastructure/contract folders.
- It verifies if dependencies can be resolved before registering.
Constants
| private CACHE_AREA |
|
| private CACHE_KEY |
|
| private IGNORED_DOMAINS |
List of directories that MUST NEVER be registered as services. These contain abstract code, contracts, or static logic. |
Methods
__construct(ContainerBuilder $container, string $project_root)
Constructor.
void
load(ContainerInterface $container)
Run the discovery and registration process.
Details
at line 96
__construct(ContainerBuilder $container, string $project_root)
Constructor.
at line 106
void
load(ContainerInterface $container)
Run the discovery and registration process.