function fromPackageFile(\PEAR2\Pyrus\PackageFileInterface $package) { \PEAR2\Pyrus\PackageFile\v2::fromPackageFile($package); if (isset($this->packageInfo['contents']['dir']['attribs']['baseinstalldir'])) { $this->baseinstalldirs = array('/' => $this->packageInfo['contents']['dir']['attribs']['baseinstalldir']); } }
function fromPackageFile(\PEAR2\Pyrus\PackageFileInterface $package) { parent::fromPackageFile($package); // reconstruct filelist/baseinstalldirs // this assumes that the filelist has been flattened, which is // always true for registries // it also assumes we are not a bundle, which is also always true for // registries as bundles are not installable $contents = $this->packageInfo['contents']['dir']['file']; if (!isset($contents[0])) { $contents = array($contents); } foreach ($contents as $file) { $this->filelist[$file['attribs']['name']] = $file; } if (isset($this->packageInfo['contents']['dir']['attribs']['baseinstalldir'])) { $this->baseinstalldirs = array('/' => $this->packageInfo['contents']['dir']['attribs']['baseinstalldir']); } }