public function getManifest(Directory $ModuleDirectory) { if (!$ModuleDirectory) { SCMSNotificationLog::instance()->pushError("Модуль \"{$ModuleDirectory->getName()}\" не найден."); return null; } $ManifestFile = $ModuleDirectory->getFile('manifest.php'); if (!$ManifestFile || !$ManifestFile->exists()) { throw new Exception("Манифест модуля \"{$ModuleDirectory->getName()}\" не найден."); } return include $ManifestFile->getPath(); }
public function getList() { $FramesDirectory = new Directory(SFW_MODULES_FRAMES); $FramesDirectory->scan(); return $FramesDirectory->getFiles(); }