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 framework and extensions directories.
  • 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.

Parameters

ContainerBuilder $container
string $project_root

at line 106
void load(ContainerInterface $container)

Run the discovery and registration process.

Parameters

ContainerInterface $container

Target container instance

Return Value

void