| 1 | <?php |
||
| 5 | class Config |
||
| 6 | { |
||
| 7 | const DEFAULT_TARGET = '.env'; |
||
| 8 | CONST DEFAULT_DIST = '.env.dist'; |
||
| 9 | |||
| 10 | /** @var string */ |
||
| 11 | private $dist; |
||
| 12 | |||
| 13 | /** @var string */ |
||
| 14 | private $target; |
||
| 15 | |||
| 16 | /** @var bool */ |
||
| 17 | private $keepOutdatedEnv; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Config constructor. |
||
| 21 | * |
||
| 22 | * @param string $dist |
||
| 23 | * @param string $target |
||
| 24 | * @param bool $keepOutdatedEnv |
||
| 25 | */ |
||
| 26 | public function __construct($dist = self::DEFAULT_DIST, $target = self::DEFAULT_TARGET, $keepOutdatedEnv = true) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param array $config |
||
| 35 | * |
||
| 36 | * @return static |
||
| 37 | */ |
||
| 38 | public static function createFormArray(array $config = []) |
||
| 52 | 13 | ||
| 53 | /** |
||
| 54 | 13 | * @return string |
|
| 55 | */ |
||
| 56 | public function getDist() |
||
| 60 | 12 | ||
| 61 | /** |
||
| 62 | 12 | * @return string |
|
| 63 | */ |
||
| 64 | public function getTarget() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return boolean |
||
| 71 | */ |
||
| 72 | public function isKeepOutdatedEnv() |
||
| 76 | } |
||
| 77 |