public function extract($archive,
$destination) { if (!
is_writable($destination)) { throw new Exception(sprintf('Destination directory "%s" is not writable',
$destination));
} $this->
validatePluginZip($archive);
$archive->
extractTo($destination);
$this->
clearOpcodeCache();
} /**
* Iterates all files of the provided zip archive
* path and validates the plugin namespace, directory traversal
* and multiple plugin directories.
*
* @throws Exception
*/
private function validatePluginZip(ZipArchive
$archive) {