Repository navigation
Internals Setting Config
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/setting/Config.php · Snapshot 8411f4287706.
Database-backed settings are initialized as named SettingModel constants and retrieved through Config.
use setting\model\SettingModel;final class ConfigDeclarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.
| Member | Declaration | Purpose or source contract |
|---|---|---|
| $settingModel | static private SettingModel $settingModel; |
Used by getConfig(). |
| Method | Signature |
|---|---|
| getConfig | public static function getConfig($package_name, $setting_name): ?SettingModel |
public static function getConfig($package_name, $setting_name): ?SettingModel| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$package_name |
$package_name |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$setting_name |
$setting_name |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
State writes: static::$settingModel.
Return expressions (including local callbacks): null; static::$settingModel.
Implementation, validation guards and interaction order
public static function getConfig($package_name, $setting_name): ?SettingModel
{
$name = "SETT_" .
strtoupper(
str_replace('-', '_', str_replace(' ', '_', $package_name))
. "_" .
str_replace('-', '_', str_replace(' ', '_', $setting_name))
);
if (defined($name)) {
static::$settingModel = constant($name);
} else {
return null;
}
return static::$settingModel;
}AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes