CRM_Core_Config
class CRM_Core_Config extends CRM_Core_Config_MagicMerge
Class CRM_Core_Config
Properties
CRM_Utils_System_Base | $userSystem | ||
CRM_Core_Permission_Base | $userPermissionClass | ||
array | $enableComponents | ||
array | $languageLimit | ||
bool | $debug | ||
bool | $doNotResetCache | ||
string | $maxFileSize | ||
string | $defaultCurrency | ||
string | $defaultCurrencySymbol | ||
string | $lcMessages | ||
string | $fieldSeparator | ||
string | $userFramework | ||
string | $verpSeparator | ||
string | $dateFormatFull | ||
string | $resourceBase | ||
string | $dsn | ||
string | $customTemplateDir | ||
string | $defaultContactCountry | ||
string | $defaultContactStateProvince | ||
string | $monetaryDecimalPoint | ||
string | $monetaryThousandSeparator |
Methods
The constructor. Sets domain id if defined, otherwise assumes single instance installation.
Get a list of $config properties and the entities to which they map.
Singleton function used to manage this object.
Deletes the web server writable directories.
Verify that the needed parameters are not null in the config.
Reset the serialized array and recompute.
This method should initialize auth sources.
One function to get domain ID.
Do general cleanup of caches, temp directories and temp tables CRM-8739
Do general cleanup of module permissions.
Flush information about loaded modules.
Clear db cache.
Clear leftover temporary tables.
Check if running in upgrade mode.
Is back office credit card processing enabled for this site - ie are there any installed processors that support it? This function is used for determining whether to show the submit credit card link, not for determining which processors to show, hence it is a config var
Resets the singleton, so that the next call to CRM_Core_Config::singleton() reloads completely.
Conditionally fire an event during the first page run.
Details
at line 88
__construct()
The constructor. Sets domain id if defined, otherwise assumes single instance installation.
in CRM_Core_Config_MagicMerge at line 71
__wakeup()
Set the map to the property map.
in CRM_Core_Config_MagicMerge at line 86
static array
getPropertyMap()
Get a list of $config properties and the entities to which they map.
This is used for two purposes:
- Runtime: Provide backward-compatible interface for reading these properties.
- Upgrade: Migrate old properties of config_backend into settings.
in CRM_Core_Config_MagicMerge at line 221
mixed
__get(string $k)
Get value.
in CRM_Core_Config_MagicMerge at line 306
__set(string $k, mixed $v)
Set value.
in CRM_Core_Config_MagicMerge at line 343
bool
__isset(string $k)
Is value set.
in CRM_Core_Config_MagicMerge at line 354
__unset(string $k)
Unset value.
in CRM_Core_Config_MagicMerge at line 390
protected SettingsBag
getSettings()
at line 102
static CRM_Core_Config
singleton(bool $loadFromDB = TRUE, bool $force = FALSE)
Singleton function used to manage this object.
at line 140
static object
getLog()
deprecated
deprecated
Returns the singleton logger for the application.
at line 155
static Mail
getMailer()
deprecated
deprecated
Retrieve a mailer to send any mail from the application.
at line 166
cleanup(int $value, bool $rmdir = TRUE)
Deletes the web server writable directories.
at line 202
static bool
check(CRM_Core_Config $config, array $required)
Verify that the needed parameters are not null in the config.
at line 215
reset()
Reset the serialized array and recompute.
use with care
at line 223
authenticate()
This method should initialize auth sources.
at line 251
static int|null
domainID(int $domainID = NULL, bool $reset = FALSE)
One function to get domain ID.
at line 269
cleanupCaches(bool $sessionReset = TRUE)
Do general cleanup of caches, temp directories and temp tables CRM-8739
at line 286
cleanupPermissions()
Do general cleanup of module permissions.
at line 316
clearModuleList()
Flush information about loaded modules.
at line 326
static
clearDBCache()
Clear db cache.
at line 360
static
clearTempTables(string|bool $timeInterval = FALSE)
Clear leftover temporary tables.
This is called on upgrade, during tests and site move, from the cron and via clear caches in the UI.
Currently the UI clear caches does not pass a time interval - which may need review as it does risk ripping the tables out from underneath a current action. This was considered but out-of-scope for CRM-16167
at line 397
static bool
isUpgradeMode(string $path = NULL)
Check if running in upgrade mode.
at line 439
static bool
isEnabledBackOfficeCreditCardPayments()
Is back office credit card processing enabled for this site - ie are there any installed processors that support it? This function is used for determining whether to show the submit credit card link, not for determining which processors to show, hence it is a config var
at line 446
addressSequence()
deprecated
deprecated
at line 453
defaultContactCountry()
deprecated
deprecated
at line 460
defaultContactCountryName()
deprecated
deprecated
at line 471
string
defaultCurrencySymbol(string $defaultCurrency = NULL)
deprecated
deprecated
at line 484
free()
Resets the singleton, so that the next call to CRM_Core_Config::singleton() reloads completely.
While normally we could call the singleton function with $force = TRUE, this function addresses a very specific use-case in the CiviCRM installer, where we cannot yet force a reload, but we want to make sure that the next call to this object gets a fresh start (ex: to initialize the DAO).
at line 499
handleFirstRun()
Conditionally fire an event during the first page run.
The install system is currently implemented several times, so it's hard to add new installation logic. We use a poor-man's method to detect the first run.
Situations to test: - New installation - Upgrade from an old version (predating first-run tracker) - Upgrade from an old version (with first-run tracking)