@@ -41,15 +41,15 @@ files that live outside of version control.
41
41
42
42
You have several options how to use this extension:
43
43
44
- * Use only the Yii environment initialization
45
- * Use only the configuration loader
46
- * Use both
44
+ 1 . Use only the Yii environment initialization
45
+ 2 . Use only the configuration loader
46
+ 3 . Use both
47
47
48
48
We first show how to use the first two options "standalone" and then a third,
49
49
combined way that includes all features.
50
50
51
51
52
- ### Initializing Yii environment
52
+ ### 1. Initializing Yii environment
53
53
54
54
This will set the ` YII_DEBUG ` and ` YII_ENV ` variables according to the respective
55
55
environment variables if those are set. It can also load them from a ` .env ` file.
@@ -67,7 +67,7 @@ $setting = Config::env('MY_SETTING', 'default');
67
67
If you leave away the application path, no ` .env ` file will be loaded.
68
68
69
69
70
- ### Loading configuration
70
+ ### 2. Loading configuration
71
71
72
72
If want to load your configuration with this extenstion, the following naming scheme
73
73
must be followed:
@@ -89,7 +89,7 @@ $config = new Config('/path/to/app', false);
89
89
$webConfig = $config->web();
90
90
```
91
91
92
- #### Local configuration
92
+ #### 2.1 Local configuration
93
93
94
94
By default local configuration files ` local.php ` and ` local-console.php ` are not
95
95
loaded. To activate this feature you can either set the ` ENABLE_LOCALCONF ` environment
@@ -115,7 +115,7 @@ $webConfig = $config->web([], true);
115
115
$consoleConfig = $config->console([], true);
116
116
```
117
117
118
- #### Merging custom configuration
118
+ #### 2.2 Merging custom configuration
119
119
120
120
You can also inject some other configuration when you fetch the web or console config:
121
121
@@ -127,7 +127,7 @@ $webConfig = $config->web(['id' => 'test'], true);
127
127
```
128
128
129
129
130
- ### Initialize Yii environment and load configuration
130
+ ### 3. Initialize Yii environment and load configuration
131
131
132
132
Let's finally show a full example that demonstrates how to use all the mentioned
133
133
features in one go. A typical setup will use the following files:
0 commit comments