In the package installation script, preflight method, is there a way to access the package's XML? If so, how?
1 Answer
Yes, you can. The preflight method has two parameters, and you can, for example, obtain the current version being installed with:
function preflight($type, $parent) {
$version = (string) $parent->getManifest()->version;
}