コード例 #1
0
ファイル: Package.php プロジェクト: peopleplan/Pyrus
 function fromPackageFile(\Pyrus\PackageFileInterface $package)
 {
     \Pyrus\PackageFile\v2::fromPackageFile($package);
     if (isset($this->packageInfo['contents']['dir']['attribs']['baseinstalldir'])) {
         $this->baseinstalldirs = array('/' => $this->packageInfo['contents']['dir']['attribs']['baseinstalldir']);
     }
 }
コード例 #2
0
ファイル: Base.php プロジェクト: peopleplan/Pyrus
 function fromPackageFile(\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']);
     }
 }