pluginsDirectory = $pluginsDirectory; } public function getIterator() { return $this->getFinder()->getIterator(); } public function count() { return $this->getFinder()->count(); } private function getFinder() { $finder = Finder::create(); return $finder ->ignoreDotFiles(true) ->ignoreVCS(true) ->useBestAdapter() ->directories() ->in($this->pluginsDirectory) ->depth(0); } }