38 $this->readFactory = $readFactory;
50 return $this->collect($componentType,
$pattern,
false);
62 return $this->collect($componentType,
$pattern,
true);
74 private function collect($componentType,
$pattern, $withContext)
77 foreach ($this->registrar->getPaths($componentType) as $componentName =>
$path) {
78 $directoryRead = $this->readFactory->create(
$path);
79 $foundFiles = $directoryRead->search(
$pattern);
80 foreach ($foundFiles as $foundFile) {
81 $foundFile = $directoryRead->getAbsolutePath($foundFile);
__construct(ComponentRegistrarInterface $registrar, Filesystem\Directory\ReadFactory $readFactory)
collectFiles($componentType, $pattern)
collectFilesWithContext($componentType, $pattern)
foreach($appDirs as $dir) $files