-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExampleEnvironment.php
38 lines (35 loc) · 997 Bytes
/
ExampleEnvironment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* This is an example Environment, for when you want to use a custom $envVar
* or want to use other than the predefined modes.
*
* If you use the extended class, don't forget to modify your bootstrap file as well
* to call this class.
*/
class ExampleEnvironment extends \marcovtwout\YiiEnvironment\Environment
{
/**
* @var string name of env var to check
*/
public $envVar = 'MY_ENVIRONMENT';
/**
* @var array list of valid modes
*/
public $validModes = [
100 => 'DEVELOPMENT',
200 => 'TEST',
250 => 'QUALITY_ASSURANCE',
300 => 'STAGING',
400 => 'PRODUCTION'
];
/**
* @var array @see https://www.yiiframework.com/doc/guide/2.0/en/concept-configurations#environment-constants
*/
public $modeToYiiEnvMap = [
'DEVELOPMENT' => 'dev',
'TEST' => 'test',
'QUALITY_ASSURANCE' => 'prod',
'STAGING' => 'prod',
'PRODUCTION' => 'prod'
];
}