class Container

Class Container

Constants

SELF

Methods

static TaggedContainerInterface
singleton(bool $reset = FALSE)

No description

ContainerInterface
loadContainer()

Find a cached container definition or construct a new one.

ContainerBuilder
createContainer()

Construct a new container.

createAngularManager()

No description

ContainerAwareEventDispatcher
createEventDispatcher(ContainerInterface $container)

No description

static LockManager
createLockManager()

No description

createApiKernel(EventDispatcher $dispatcher, $magicFunctionProvider)

No description

static 
boot(bool $loadFromDB)

Get a list of boot services.

static 
getBootService($name)

No description

static bool
isContainerBooted()

Determine whether the container services are available.

Details

at line 38
static TaggedContainerInterface singleton(bool $reset = FALSE)

Parameters

bool $reset Whether to forcibly rebuild the entire container.

Return Value

TaggedContainerInterface

at line 63
ContainerInterface loadContainer()

Find a cached container definition or construct a new one.

There are many weird contexts in which Civi initializes (eg different variations of multitenancy and different permutations of CMS/CRM bootstrap), and hook_container may fire a bit differently in each context. To mitigate risk of leaks between environments, we compute a unique envID (md5(DB_NAME, HTTP_HOST, SCRIPT_FILENAME, etc)) and use separate caches for each (eg "templates_c/CachedCiviContainer.$ENVID.php").

Constants: - CIVICRM_CONTAINER_CACHE -- 'always' [default], 'never', 'auto' - CIVICRM_DSN - CIVICRM_DOMAIN_ID - CIVICRM_TEMPLATE_COMPILEDIR

Return Value

ContainerInterface

at line 102
ContainerBuilder createContainer()

Construct a new container.

Return Value

ContainerBuilder

at line 235
Manager createAngularManager()

Return Value

Manager

at line 243
ContainerAwareEventDispatcher createEventDispatcher(ContainerInterface $container)

Parameters

ContainerInterface $container

Return Value

ContainerAwareEventDispatcher

at line 281
static LockManager createLockManager()

Return Value

LockManager

at line 303
Kernel createApiKernel(EventDispatcher $dispatcher, $magicFunctionProvider)

Parameters

EventDispatcher $dispatcher
$magicFunctionProvider

Return Value

Kernel

at line 358
static boot(bool $loadFromDB)

Get a list of boot services.

These are services which must be setup before the container can operate.

Parameters

bool $loadFromDB

Exceptions

CRM_Core_Exception

at line 401
static getBootService($name)

Parameters

$name

at line 410
static bool isContainerBooted()

Determine whether the container services are available.

Return Value

bool