1 | <?php |
||
17 | class Finder |
||
18 | { |
||
19 | /** |
||
20 | * List of default config file names. |
||
21 | * |
||
22 | * @var string[] |
||
23 | */ |
||
24 | private $defaultConfigNames = [ |
||
25 | 'phpbu.xml', |
||
26 | 'phpbu.xml.dist', |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * Try to find a configuration file. |
||
31 | * |
||
32 | * @param string $path |
||
33 | * @return string |
||
34 | * @throws \InvalidArgumentException |
||
35 | * @throws \phpbu\App\Exception |
||
36 | */ |
||
37 | public function findConfiguration(string $path) : string |
||
56 | |||
57 | /** |
||
58 | * Check directory for default configuration files phpbu.xml, phpbu.xml.dist. |
||
59 | * |
||
60 | * @param string $path |
||
61 | * @return string |
||
62 | * @throws \phpbu\App\Exception |
||
63 | */ |
||
64 | protected function findConfigurationInDir(string $path) : string |
||
74 | } |
||
75 |