当前位置: 首页>>代码示例>>PHP>>正文


PHP Package::setBinaries方法代码示例

本文整理汇总了PHP中Composer\Package\Package::setBinaries方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::setBinaries方法的具体用法?PHP Package::setBinaries怎么用?PHP Package::setBinaries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Composer\Package\Package的用法示例。


在下文中一共展示了Package::setBinaries方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: resolvePackageDependencies

 private function resolvePackageDependencies($repository, $packages, $packageName)
 {
     $config = $packages[$packageName];
     foreach ($config['deps'] as $dependencyName) {
         if ($dependencyName === 'vendor/php' || strpos($dependencyName, 'vendor/ext-') === 0 || strpos($dependencyName, 'vendor/lib-') === 0) {
             continue;
         }
         if (!isset($packages[$dependencyName])) {
             throw new \RuntimeException("Requiring non existant package '" . $dependencyName . "' in '" . $packageName . "'.");
         }
         $dependency = $packages[$dependencyName];
         $package = new Package($dependency['path'], "@stable", "@stable");
         $package->setType('fiddler');
         if (isset($dependency['autoload']) && is_array($dependency['autoload'])) {
             $package->setAutoload($dependency['autoload']);
         }
         if (isset($dependency['bin']) && is_array($dependency['bin'])) {
             $package->setBinaries($dependency['bin']);
         }
         if (!$repository->hasPackage($package)) {
             $repository->addPackage($package);
             $this->resolvePackageDependencies($repository, $packages, $dependencyName);
         }
     }
 }
开发者ID:JasLin,项目名称:fiddler,代码行数:25,代码来源:Build.php

示例2: resolvePackageDependencies

 private function resolvePackageDependencies($repository, $packages, $packageName)
 {
     $config = $packages[$packageName];
     $dependencies = $config['deps'];
     if (isset($config['deps-dev'])) {
         $dependencies = array_merge($dependencies, $config['deps-dev']);
     }
     foreach ($dependencies as $dependencyName) {
         $isVendor = strpos($dependencyName, 'vendor/') === 0;
         if ($dependencyName === 'vendor/php' || strpos($dependencyName, 'vendor/ext-') === 0 || strpos($dependencyName, 'vendor/lib-') === 0) {
             continue;
             // Meta-dependencies that composer checks
         }
         if (!isset($packages[$dependencyName])) {
             if ($dependencyName == 'vendor/composer-plugin-api') {
                 continue;
             }
             if ($isVendor) {
                 throw new \RuntimeException("Requiring non-existent composer-package '" . $dependencyName . "' in '" . $packageName . "'. Please ensure it is present in composer.json.");
             } else {
                 throw new \RuntimeException("Requiring non-existent repo-module '" . $dependencyName . "' in '" . $packageName . "'. Please check that the subdirectory exists, or append \"vendor/\" to reference a composer-package.");
             }
         }
         $dependency = $packages[$dependencyName];
         $package = new Package($dependency['path'], "@stable", "@stable");
         $package->setType('monorepo');
         if (isset($dependency['autoload']) && is_array($dependency['autoload'])) {
             $package->setAutoload($dependency['autoload']);
         }
         if (isset($dependency['bin']) && is_array($dependency['bin'])) {
             $package->setBinaries($dependency['bin']);
         }
         if (!$repository->hasPackage($package)) {
             $repository->addPackage($package);
             $this->resolvePackageDependencies($repository, $packages, $dependencyName);
         }
     }
 }
开发者ID:beberlei,项目名称:composer-monorepo-plugin,代码行数:38,代码来源:Build.php

示例3: bindPackageValues

 /**
  * @param string $newName
  * @param array $package
  * @return Package
  */
 protected static function bindPackageValues($newName, array $package)
 {
     $new = new Package($newName, $package['version'], $package['version']);
     $new->setType('dist');
     if (isset($package['bin'])) {
         $new->setBinaries($package['bin']);
     }
     if (isset($package['dist']['type'])) {
         $new->setDistType($package['dist']['type']);
     }
     if (isset($package['dist']['url'])) {
         $new->setDistUrl($package['dist']['url']);
     }
     if (isset($package['excludes'])) {
         $new->setArchiveExcludes($package['excludes']);
     }
     return $new;
 }
开发者ID:REZ1DENT3,项目名称:mystem,代码行数:23,代码来源:MystemBinaryInstaller.php


注:本文中的Composer\Package\Package::setBinaries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。