trait CapsuleManagerTrait

Properties

static protected object|null $instance

The current globally used instance.

protected Container $container

The container instance.

Methods

void
setupContainer(Container $container)

Setup the IoC container instance.

void
setAsGlobal()

Make this capsule instance available globally.

getContainer()

Get the IoC container instance.

void
setContainer(Container $container)

Set the IoC container instance.

static void
flushState()

Flush all static state.

Details

at line 26
protected void setupContainer(Container $container)

Setup the IoC container instance.

Parameters

Container $container

Return Value

void

at line 41
void setAsGlobal()

Make this capsule instance available globally.

Swaps the global Capsule instance used by static calls; request-time use races across coroutines.

Return Value

void

at line 50
Container getContainer()

Get the IoC container instance.

Return Value

Container

at line 61
void setContainer(Container $container)

Set the IoC container instance.

Swaps the Capsule container used by this standalone manager; request-time use races across coroutines.

Parameters

Container $container

Return Value

void

at line 70
static void flushState()

Flush all static state.

Return Value

void