/** * Exportiert alle Ordner $folders aus dem Verzeichnis /files. * * @param array $folders Array von Ordnernamen, die exportiert werden sollen * * @return string Inhalt des Tar-Archives als String */ public static function exportFiles($folders) { $tar = new rex_backup_tar(); // ----- EXTENSION POINT $tar = rex_extension::registerPoint(new rex_extension_point('BACKUP_BEFORE_FILE_EXPORT', $tar)); foreach ($folders as $item) { self::addFolderToTar($tar, rex_url::frontend(), $item); } // ----- EXTENSION POINT $tar = rex_extension::registerPoint(new rex_extension_point('BACKUP_AFTER_FILE_EXPORT', $tar)); return $tar->toTar(null, true); }
/** * Exportiert alle Ordner $folders aus dem Verzeichnis /files. * * @param array $folders Array von Ordnernamen, die exportiert werden sollen * * @return string Inhalt des Tar-Archives als String */ function rex_a1_export_files($folders) { $tar = new rex_tar(); // ----- EXTENSION POINT $tar = rex_extension::registerPoint(new rex_extension_point('A1_BEFORE_FILE_EXPORT', $tar)); foreach ($folders as $key => $item) { _rex_a1_add_folder_to_tar($tar, rex_url::frontend(), $key); } // ----- EXTENSION POINT $tar = rex_extension::registerPoint(new rex_extension_point('A1_AFTER_FILE_EXPORT', $tar)); return $tar->toTar(null, true); }