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


PHP Composer::setPluginManager方法代码示例

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


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

示例1: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     $this->io = new BufferIO();
     $this->composer = new Composer();
     $this->composer->setPackage(new RootPackage('my/project', '1.0.0', '1.0.0'));
     $this->composer->setPluginManager(new PluginManager($this->io, $this->composer));
     $this->composer->setEventDispatcher(new EventDispatcher($this->composer, $this->io));
 }
开发者ID:e-tipalchuk,项目名称:composer-changelogs,代码行数:11,代码来源:ChangelogsPluginTest.php

示例2: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     $this->tempDir = __DIR__ . '/temp';
     $this->config = new Config(false, realpath(__DIR__ . '/fixtures/local'));
     $this->config->merge(['config' => ['home' => __DIR__]]);
     $this->io = new BufferIO();
     $this->composer = new Composer();
     $this->composer->setConfig($this->config);
     $this->composer->setPackage(new RootPackage('my/project', '1.0.0', '1.0.0'));
     $this->composer->setPluginManager(new PluginManager($this->io, $this->composer));
     $this->composer->setEventDispatcher(new EventDispatcher($this->composer, $this->io));
     self::cleanTempDir();
     mkdir($this->tempDir);
 }
开发者ID:pyrech,项目名称:composer-changelogs,代码行数:17,代码来源:ChangelogsPluginTest.php

示例3: setUp

 protected function setUp()
 {
     $loader = new JsonLoader(new ArrayLoader());
     $this->packages = array();
     $this->directory = $this->getUniqueTmpDirectory();
     for ($i = 1; $i <= 7; $i++) {
         $filename = '/Fixtures/plugin-v' . $i . '/composer.json';
         mkdir(dirname($this->directory . $filename), 0777, true);
         $this->packages[] = $loader->load(__DIR__ . $filename);
     }
     $dm = $this->getMockBuilder('Composer\\Downloader\\DownloadManager')->disableOriginalConstructor()->getMock();
     $this->repository = $this->getMock('Composer\\Repository\\InstalledRepositoryInterface');
     $rm = $this->getMockBuilder('Composer\\Repository\\RepositoryManager')->disableOriginalConstructor()->getMock();
     $rm->expects($this->any())->method('getLocalRepository')->will($this->returnValue($this->repository));
     $im = $this->getMock('Composer\\Installer\\InstallationManager');
     $im->expects($this->any())->method('getInstallPath')->will($this->returnCallback(function ($package) {
         return __DIR__ . '/Fixtures/' . $package->getPrettyName();
     }));
     $this->io = $this->getMock('Composer\\IO\\IOInterface');
     $dispatcher = $this->getMockBuilder('Composer\\EventDispatcher\\EventDispatcher')->disableOriginalConstructor()->getMock();
     $this->autoloadGenerator = new AutoloadGenerator($dispatcher);
     $this->composer = new Composer();
     $config = new Config();
     $this->composer->setConfig($config);
     $this->composer->setDownloadManager($dm);
     $this->composer->setRepositoryManager($rm);
     $this->composer->setInstallationManager($im);
     $this->composer->setAutoloadGenerator($this->autoloadGenerator);
     $this->pm = new PluginManager($this->io, $this->composer);
     $this->composer->setPluginManager($this->pm);
     $config->merge(array('config' => array('vendor-dir' => $this->directory . '/Fixtures/', 'home' => $this->directory . '/Fixtures', 'bin-dir' => $this->directory . '/Fixtures/bin')));
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:32,代码来源:PluginInstallerTest.php


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