final class container_factory

internal  
 

Container Factory.

Responsible for building, configuring, and compiling the Symfony ContainerBuilder. It handles the "Synthetic" service injection pattern to bridge Moodle's runtime global state with the strictly typed DI container.

Methods

void
__wakeup()

No description

static ContainerBuilder
get_instance(kernel $kernel, router $router)

Returns the built container (Singleton).

static void
reset()

Resets the singleton instance and its internal ContainerBuilder.

Details

at line 65
void __wakeup()

No description

Return Value

void

at line 78
static ContainerBuilder get_instance(kernel $kernel, router $router)

Returns the built container (Singleton).

Parameters

kernel $kernel

the kernel instance to be injected

router $router

the router to configure scanning

Return Value

ContainerBuilder

at line 95
static void reset()

Resets the singleton instance and its internal ContainerBuilder.

Intended mainly for test isolation (e.g. PHPUnit).

Return Value

void