extension = '.zip'; } public static function isCompatible() { return class_exists('ZipArchive'); } protected function storeContent($filepath, $content) { $zip = new ZipArchive(); if ($zip->open($filepath, ZipArchive::CREATE) !== true) { return false; } $zip->addFromString("content.html", $content); return $zip->close(); } protected function readContent($filepath) { $zip = new ZipArchive(); if ($zip->open($filepath, ZipArchive::CHECKCONS) !== true) { return false; } $content = $zip->getFromIndex(0); $zip->close(); return $content; } } }