1 | <?php |
||
21 | final class RecursiveFileLocator implements FileLocatorInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var FinderFactoryInterface |
||
25 | */ |
||
26 | private $finderFactory; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | private $paths; |
||
32 | |||
33 | /** |
||
34 | * @param FinderFactoryInterface $finderFactory |
||
35 | * @param array $paths An array of paths where to look for resources |
||
36 | */ |
||
37 | public function __construct(FinderFactoryInterface $finderFactory, array $paths) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function locateFileNamed($name) |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function locateFilesNamed($name) |
||
58 | |||
59 | /** |
||
60 | * @param string $name |
||
61 | * |
||
62 | * @return \Generator |
||
63 | */ |
||
64 | private function doLocateFilesNamed($name) |
||
96 | |||
97 | /** |
||
98 | * @param string $name |
||
99 | */ |
||
100 | private function assertNameIsNotEmpty($name) |
||
108 | } |
||
109 |