Configuration Variables
Apex provides easy ways to store and manage configuration variables via the central App class. Every configuration variable is formatted the same way:
PACKAGE.ALIAS
Each configuration variable is the alias of the package and the alias of the variable itself seperated by a period. For example, users.username_column
is a valid configuration variable.
Below are the methods to retrive and update configuration variables via the App class:
- config (string $key, ?string $default = null): mixed
- hasConfig (string $key): bool
- getAllConfig (: array
- setConfigVar (string $key, string $value): void