Configuration
Configuration class handles global settings for the complete application (defined in the old core as constants).
This class operates with a unified database of settings, stored in the file .settings.php. It stores arbitrary data. For example, a complete pool of data can be stored for connection names.
The settings file structure contains the parameter readonly for specific steins, which means that these settings cannot be modified via API.
Query the namespace:
Final class, provides for execution: \ArrayAccess
, \Iterator
, \Countable
.
When modifications are made, you must call the method saveConfiguration, otherwise these modifications won't be saved.
Method | Description | Available from version |
---|---|---|
addReadonly | Modifies "read only" parameters. | |
add | Modifies/adds parameters. | |
get | Returns parameter values. | |
getInstance | Gets an object for the Configuration class. | |
getValue | Gets value for single parameters. | |
saveConfiguration | Saves configuration changes. | |
wnc | Static method without parameters. Creates settings file named .settings.php
Important!The method will replace the file if it already exists.
|
© «Bitrix24», 2001-2024