Yaconf ConfigureOptions
Yaconf ConfigureOptionsNameDefaultChangeableChangelogyaconf.directory""INI_SYSTEMyaconf.check_delay300INI_SYSTEM
Runtime Runtime
| Name | Default | Changeable | Changelog |
|---|---|---|---|
| yaconf.directory | "" | INI_SYSTEM | |
| yaconf.check_delay | 300 | INI_SYSTEM |
Title
yaconf.directorystringThe directory where all INI configuration files are placed. Only files with the
.iniextension are loaded. Sub-directories are loaded recursively (up to 16 levels deep); each one acts as a key level, so a filedatabase.iniplaced in theusers/sub-directory is addressed as"users.database". Available since Yaconf 1.2.0; before that only files directly in the directory were loaded.The examples below assume the following
database.iniplaced in the configured directory, alongside afeatures.inithat carries per-feature settings.INI file syntax
ini; database.ini name=production ; scalar value version=PHP_VERSION ; PHP constants are resolved connection_string=${DATABASE_URL} ; environment variables are resolved options.max_connections=50 ; nested hash key options.timeout=30 ; array entries, both notations are equivalent replicas.0=replica-1.example.com replicas[]=replica-2.example.comINI sections example
ini; features.ini [default] cache_enabled=on rate_limit=100 ; the "premium" section inherits every key from "default" and ; overrides the ones it redefines [premium:default] rate_limit=1000yaconf.check_delayintThe interval, in seconds, at which Yaconf checks whether any loaded INI file has changed and reloads the changed ones (the change is detected by comparing directory modification times). Setting it to
0makes Yaconf check on every request.NoteThis directive is only registered in non-ZTS builds. On ZTS (thread-safe) builds configurations are loaded at startup and automatic reloading is not available; restart PHP to pick up changes.