CodeExplorer statName example
/**
* @return bool
*/
public function isPlugin(ZipArchive
$archive) { $entry =
$archive->
statIndex(0
);
$pluginName =
explode('/',
$entry['name'
])[0
];
$bootstrapFile =
$pluginName . '/' .
$pluginName . '.php';
$stat =
$archive->
statName($bootstrapFile);
return $stat !== false;
}}public function isPlugin(\ZipArchive
$archive): bool
{ $entry =
$archive->
statIndex(0
);
if ($entry === false
) { return false;
} $pluginName =
explode('/',
(string) $entry['name'
])[0
];
$composerFile =
$pluginName . '/composer.json';
$manifestFile =
$pluginName . '/manifest.xml';
$statComposerFile =
$archive->
statName($composerFile);
$statManifestFile =
$archive->
statName($manifestFile);
return $statComposerFile !== false &&
$statManifestFile === false;
} public function isApp(\ZipArchive
$archive): bool
{ $entry =
$archive->
statIndex(0
);
if ($entry === false
) { return false;
}