1 | <?php |
||
21 | class ConfigLocator |
||
22 | { |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $customConfigFilename; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $magentoRootFolder; |
||
32 | |||
33 | /** |
||
34 | * ConfigLocator constructor. |
||
35 | * @param string $configFilename |
||
36 | * @param string $magentoRootFolder |
||
37 | */ |
||
38 | public function __construct($configFilename, $magentoRootFolder) |
||
43 | |||
44 | /** |
||
45 | * Obtain the user-config-file, it is placed in the homedir, e.g. ~/.n98-magerun2.yaml |
||
46 | * |
||
47 | * @return ConfigFile|null |
||
48 | */ |
||
49 | public function getUserConfigFile() |
||
67 | |||
68 | /** |
||
69 | * Obtain the project-config-file, it is placed in the magento app/etc dir, e.g. app/etc/n98-magerun2.yaml |
||
70 | * |
||
71 | * @return ConfigFile|null |
||
72 | */ |
||
73 | public function getProjectConfigFile() |
||
90 | |||
91 | /** |
||
92 | * Obtain the (optional) stop-file-config-file, it is placed in the folder of the stop-file, always |
||
93 | * prefixed with a dot: stop-file-folder/.n98-magerun2.yaml |
||
94 | * |
||
95 | * @param string $magerunStopFileFolder |
||
96 | * @return ConfigFile|null |
||
97 | */ |
||
98 | public function getStopFileConfigFile($magerunStopFileFolder) |
||
119 | |||
120 | /** |
||
121 | * @return array |
||
122 | */ |
||
123 | private function getUserConfigFilePaths() |
||
146 | } |
||
147 |