47 public function get($filename, $scope)
49 $paths = $this->getFileCollection($filename, $scope);
61 protected function getFileCollection($filename, $scope)
64 $modulesPath = $this->moduleResolver->getModulesPath();
66 foreach ($modulesPath as $modulePath) {
67 $path = $modulePath . DIRECTORY_SEPARATOR . $scope . DIRECTORY_SEPARATOR;
69 $directoryIterator = new \RecursiveIteratorIterator(
70 new \RecursiveDirectoryIterator(
72 \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS
75 $regexpIterator = new \RegexIterator($directoryIterator, $filename);
77 foreach ($regexpIterator as $file) {
78 if ($file->isFile() && $file->isReadable()) {
79 $paths[] = $file->getRealPath();
85 return $this->moduleResolver->sortFilesByModuleSequence(
$paths);
__construct(ModuleResolver $moduleResolver=null)