You are here

class Zip in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Archiver/Zip.php \Drupal\Core\Archiver\Zip
  2. 8 core/modules/system/src/Plugin/Archiver/Zip.php \Drupal\system\Plugin\Archiver\Zip
Same name and namespace in other branches
  1. 9 core/modules/system/src/Plugin/Archiver/Zip.php \Drupal\system\Plugin\Archiver\Zip

Defines an archiver implementation for .zip files.

@link http://php.net/zip

Plugin annotation


@Archiver(
  id = "Zip",
  title = @Translation("Zip"),
  description = @Translation("Handles zip files."),
  extensions = {"zip"}
)

Hierarchy

Expanded class hierarchy of Zip

File

core/modules/system/src/Plugin/Archiver/Zip.php, line 19

Namespace

Drupal\system\Plugin\Archiver
View source
class Zip extends BaseZip {

}

Members

Namesort descending Modifiers Type Description Overrides
Zip::$zip protected property The underlying ZipArchive instance that does the heavy lifting.
Zip::add public function Adds the specified file or directory to the archive. Overrides ArchiverInterface::add
Zip::extract public function Extracts multiple files in the archive to the specified path. Overrides ArchiverInterface::extract
Zip::getArchive public function Retrieves the zip engine itself.
Zip::listContents public function Lists all files in the archive. Overrides ArchiverInterface::listContents
Zip::remove public function Removes the specified file from the archive. Overrides ArchiverInterface::remove
Zip::__construct public function Constructs a Zip object.