setPhpVersion() public static method

XXX: needs to be removed.
public static setPhpVersion ( $phpVersion )
コード例 #1
0
ファイル: InstallCommand.php プロジェクト: bensb/phpbrew
 public function execute($extName, $version = 'stable')
 {
     $logger = $this->getLogger();
     $extensions = array();
     if (Utils::startsWith($extName, '+')) {
         $config = Config::getConfigParam('extensions');
         $extName = ltrim($extName, '+');
         if (isset($config[$extName])) {
             foreach ($config[$extName] as $extensionName => $extOptions) {
                 $args = explode(' ', $extOptions);
                 $extensions[$extensionName] = $this->getExtData($args);
             }
         } else {
             $logger->info('Extension set name not found. Have you configured it at the config.yaml file?');
         }
     } else {
         $args = array_slice(func_get_args(), 1);
         $extensions[$extName] = $this->getExtData($args);
     }
     if ($this->options->{'php-version'} !== null) {
         $phpVersion = Utils::findLatestPhpVersion($this->options->{'php-version'});
         Config::setPhpVersion($phpVersion);
     }
     foreach ($extensions as $extensionName => $extData) {
         $extension = new Extension($extensionName, $logger);
         $extension->install($extData->version, $extData->options);
     }
     Config::useSystemPhpVersion();
 }