Civi
class Civi
Class Civi
The "Civi" class provides a facade for accessing major subsystems, such as the service-container and settings manager. It serves as a bridge which allows procedural code to access important objects.
General principles: - Each function provides access to a major subsystem. - Each function performs a simple lookup. - Each function returns an interface. - Whenever possible, interfaces should be well-known (e.g. based on a standard or well-regarded provider).
Properties
static array | $statics | A central location for static variable storage. |
Methods
Retrieve a named cache instance.
Get the service container.
Get the event dispatcher.
No description
No description
Fetch a service from the container.
Reset all ephemeral system state, e.g. statics, singletons, containers.
No description
Obtain the contact's personal settings.
Obtain the domain settings.
Details
at line 48
static CRM_Utils_Cache_Interface
cache(string $name = 'default')
Retrieve a named cache instance.
at line 57
static ContainerInterface
container()
Get the service container.
at line 66
static EventDispatcherInterface
dispatcher()
Get the event dispatcher.
at line 73
static LockManager
lockManager()
at line 80
static LoggerInterface
log()
at line 89
static Paths
paths()
Obtain the core file/path mapper.
at line 100
static mixed
service(string $id)
Fetch a service from the container.
at line 108
static
reset()
Reset all ephemeral system state, e.g. statics, singletons, containers.
at line 116
static CRM_Core_Resources
resources()
at line 132
static SettingsBag
contactSettings(NULL|int $contactID = NULL, NULL|int $domainID = NULL)
Obtain the contact's personal settings.
at line 143
static SettingsBag
settings(int|null $domainID = NULL)
Obtain the domain settings.