1 | <?php |
||
19 | final class EnvDirectoryLocator implements FixtureLocatorInterface |
||
20 | { |
||
21 | use IsAServiceTrait; |
||
22 | |||
23 | private $fixturesPath; |
||
24 | private $rootDirs; |
||
25 | |||
26 | /** |
||
27 | * @param string $fixturePath Path to which to look for fixtures relative to the bundle/base directory paths. |
||
28 | * @param string[] $rootDirs Root directories. |
||
29 | */ |
||
30 | public function __construct(string $fixturePath, array $rootDirs) |
||
35 | |||
36 | /** |
||
37 | * Locates fixture files found inside a folder matching the environment name. |
||
38 | * |
||
39 | * For example, if the given fixture path is 'Resources/fixtures', it will try to locate |
||
40 | * the files in the 'Resources/fixtures/dev' for each bundle passed ('dev' being the |
||
41 | * environment). |
||
42 | * |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function locateFiles(array $bundles, string $environment): array |
||
64 | |||
65 | /** |
||
66 | * Gets the list of files that can be found in the given path. |
||
67 | * |
||
68 | * @param string $path |
||
69 | * @param string $environment |
||
70 | * |
||
71 | * @return string[] |
||
72 | */ |
||
73 | private function doLocateFiles(string $path, string $environment): array |
||
100 | } |
||
101 |