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


PHP Config::getCurrentPhpConfigBin方法代码示例

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


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

示例1: install

 public function install(Extension $ext, array $configureOptions = array())
 {
     $sourceDir = $ext->getSourceDirectory();
     $pwd = getcwd();
     $buildLogPath = $sourceDir . DIRECTORY_SEPARATOR . 'build.log';
     $make = new MakeTask($this->logger, $this->options);
     $make->setBuildLogPath($buildLogPath);
     $this->logger->info("Log stored at: {$buildLogPath}");
     $this->logger->info("Changing directory to {$sourceDir}");
     chdir($sourceDir);
     if (!$this->options->{'no-clean'} && $ext->isBuildable()) {
         $clean = new MakeTask($this->logger, $this->options);
         $clean->setQuiet();
         $clean->clean($ext);
     }
     if ($ext->getConfigM4File() !== "config.m4" && !file_exists($sourceDir . DIRECTORY_SEPARATOR . 'config.m4')) {
         symlink($ext->getConfigM4File(), $sourceDir . DIRECTORY_SEPARATOR . 'config.m4');
     }
     // If the php version is specified, we should get phpize with the correct version.
     $this->logger->info('===> Phpize...');
     Utils::system("phpize > {$buildLogPath} 2>&1", $this->logger);
     // here we don't want to use closure, because
     // 5.2 does not support closure. We haven't decided whether to
     // support 5.2 yet.
     $escapeOptions = array_map('escapeshellarg', $configureOptions);
     $this->logger->info("===> Configuring...");
     $phpConfig = Config::getCurrentPhpConfigBin();
     if (file_exists($phpConfig)) {
         $this->logger->debug("Appending argument: --with-php-config={$phpConfig}");
         $escapeOptions[] = '--with-php-config=' . $phpConfig;
     }
     // Utils::system('./configure ' . join(' ', $escapeOptions) . ' >> build.log 2>&1');
     $cmd = './configure ' . join(' ', $escapeOptions);
     if (!$this->logger->isDebug()) {
         $cmd .= " >> {$buildLogPath} 2>&1";
     }
     Utils::system($cmd, $this->logger);
     $this->logger->info("===> Building...");
     if ($this->logger->isDebug()) {
         passthru('make');
     } else {
         $make->run($ext);
     }
     $this->logger->info("===> Installing...");
     // This function is disabled when PHP is running in safe mode.
     if ($this->logger->isDebug()) {
         passthru('make install');
     } else {
         $make->install($ext);
     }
     // TODO: use getSharedLibraryPath()
     $this->logger->debug("Installed extension library: " . $ext->getSharedLibraryPath());
     // Try to find the installed path by pattern
     // Installing shared extensions: /Users/c9s/.phpbrew/php/php-5.4.10/lib/php/extensions/debug-non-zts-20100525/
     chdir($pwd);
     $this->logger->info("===> Extension is installed.");
 }
开发者ID:WebDevJL,项目名称:phpbrew,代码行数:57,代码来源:ExtensionInstaller.php


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