fetchAllFromOperations() public method

public fetchAllFromOperations ( Composer\IO\IOInterface $io, Composer\Config $config, array $ops )
$io Composer\IO\IOInterface
$config Composer\Config
$ops array
コード例 #1
0
ファイル: PrefetcherTest.php プロジェクト: DQNEO/prestissimo
 public function testFetchAllWithInstallButFileExists()
 {
     list($opp, $pp) = $this->createProphecies();
     $pp->getName()->willReturn('');
     $pp->getDistType()->willReturn('html');
     $pp->getDistUrl()->willReturn('http://example.com/');
     $pp->getDistMirrors()->willReturn(array());
     $pp->getSourceUrl()->willReturn('git://uso800');
     $path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . FileDownloaderDummy::getCacheKeyCompat($pp->reveal(), 'http://example.com/');
     $fp = fopen($path, 'wb');
     $opp->getPackage()->willReturn($pp->reveal())->shouldBeCalled();
     $fetcher = new Prefetcher();
     $fetcher->fetchAllFromOperations($this->iop->reveal(), $this->configp->reveal(), array($opp->reveal()));
     fclose($fp);
     unlink($path);
 }
コード例 #2
0
ファイル: Plugin.php プロジェクト: hirak/prestissimo
 /**
  * pre-fetch parallel by curl_multi
  */
 public function onPostDependenciesSolving(Installer\InstallerEvent $ev)
 {
     if ($this->disabled) {
         return;
     }
     $prefetcher = new Prefetcher();
     $prefetcher->fetchAllFromOperations($this->io, $this->config, $ev->getOperations());
 }