public function fileSupportsUnserializePhpPresentation($pFilename = '')
{
// Check if file exists
if (!file_exists($pFilename)) {
throw new \Exception("Could not open " . $pFilename . " for reading! File does not exist.");
}
$oZip = new ZipArchive();
// Is it a zip ?
if ($oZip->open($pFilename) === true) {
// Is it an OpenXML Document ?
// Is it a Presentation ?
if (is_array($oZip->statName('META-INF/manifest.xml')) && is_array($oZip->statName('mimetype')) && $oZip->getFromName('mimetype') == 'application/vnd.oasis.opendocument.presentation') {
return true;
}
}
return false;
}