/**
* @param string $prefix
*/
private function assertValid(ZipArchive
$archive,
$prefix) { for ($i = 2;
$i <
$archive->numFiles; ++
$i) { $stat =
$archive->
statIndex($i);
$this->
assertNoDirectoryTraversal($stat['name'
]);
$this->
assertPrefix($stat['name'
],
$prefix);
} } /**
* @return string
*/
private function getLegacyPluginPrefix(ZipArchive
$archive) { $segments =
$archive->
statIndex(0
);
$segments =
array_filter(explode('/',
$segments['name'
]));