getBaseDir() . '/' . $base; $dir = new RecursiveDirectoryIterator($basedir); $iterator = new RecursiveIteratorIterator( $dir, RecursiveIteratorIterator::SELF_FIRST ); foreach ($iterator as $file) { if (! $file->isFile()) { continue; } if (in_array($file->getExtension(), $extensions)) { $files[] = $file->getPathname(); } } return $files; } public function getBaseDir($file = null) { if ($this->basedir === null) { $this->basedir = Icinga::app() ->getModuleManager() ->getModule('director') ->getBaseDir(); } if ($file === null) { return $this->basedir; } else { return $this->basedir . '/' . $file; } } }