public function Zip::extract

Implements Drupal\Component\Archiver\ArchiveInterface::extract().

Overrides ArchiverInterface::extract

File

drupal/core/lib/Drupal/Component/Archiver/Zip.php, line 64
Definition of Drupal\Component\Archiver\Zip.

Class

Zip
Defines a archiver implementation for .zip files.

Namespace

Drupal\Component\Archiver

Code

public function extract($path, array $files = array()) {
  if ($files) {
    $this->zip
      ->extractTo($path, $files);
  }
  else {
    $this->zip
      ->extractTo($path);
  }
  return $this;
}