protected function getFiles() { if ($this->files === null) { $this->prepareFilters(); $this->files = array(); $fs = $this->pathname->rootAdapter()->getFilesystem(); $fileNames = $this->pathname->localAdapter()->ls($this->pathname); foreach ($fileNames as $fileName) { $childPathname = $this->pathname->child($fileName); $file = $fs->getFile($childPathname); if ($this->applyBitmaskFilters($file) && $this->applyGlobFilters($file) && $this->applyCallableFilters($file)) { $this->files[] = $file; } } $this->keys = array_keys($this->files); } return $this->files; }