You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> ATTENTION: The PHP functions `getenv` or `putenv` are not supported by this plugin since v2. Do use super globals `$_ENV`, `$_SERVER` or the plugins helper `env()`.
Unless you preload the `Bnomei\DotEnv` class using an `include_once` statement yourself the class will not be available in the kirby config files. But some options take a `callback` not just a `string` value. If your desired option does not then consider reporting a github issue at **their** repository. Adding a callback for an option is 3 lines of work.
94
-
95
-
**code/in/another/plugin.php**
58
+
**on staging server**
96
59
```php
97
-
public function thisIsWereAllConfigValuesAreLoaded()
See [config examples](https://github.com/bnomei/kirby3-dotenv/tree/master/tests/site/config) on how to use this plugin in combination with kirbys config files. Since v2 this plugin support Kirbys [Multi-environment setup](https://getkirby.com/docs/guide/configuration#multi-environment-setup) used to merging multiple config files.
| dir |`callback`| returning `kirby()->roots()->index(). When installing Kirby 3 with Composer use a `function() { return realpath(kirby()->roots()->index() . '/../'); }` |
113
-
|filename|`.env`||
75
+
|file|`.env`||
114
76
| required |`[]`| You can define required variables in the Settings using an array. If any of these is missing a `RuntimeException` will be thrown. |
77
+
| setup |`callback`| perform additional tasks on raw dotenv class instance |
0 commit comments