getConfigureOptions() public method

public getConfigureOptions ( )
コード例 #1
0
ファイル: ShowCommand.php プロジェクト: WebDevJL/phpbrew
 public function describeExtension(Extension $ext)
 {
     $info = array('Name' => $ext->getExtensionName(), 'Source Directory' => $ext->getSourceDirectory(), 'Config' => $ext->getConfigM4Path(), 'INI File' => $ext->getConfigFilePath(), 'Extension' => $ext instanceof PeclExtension ? 'Pecl' : 'Core', 'Zend' => $ext->isZend() ? 'yes' : 'no', 'Loaded' => extension_loaded($ext->getExtensionName()) ? $this->formatter->format('yes', 'green') : $this->formatter->format('no', 'red'));
     foreach ($info as $label => $val) {
         $this->logger->writeln(sprintf('%20s: %s', $label, $val));
     }
     $options = $ext->getConfigureOptions();
     if (!empty($options)) {
         $this->logger->newline();
         $this->logger->writeln(sprintf('%20s: ', 'Configure Options'));
         $this->logger->newline();
         foreach ($options as $option) {
             $this->logger->writeln(sprintf('        %-32s %s', $option->option . ($option->valueHint ? '[=' . $option->valueHint . ']' : ''), $option->desc));
             $this->logger->newline();
         }
     }
 }
コード例 #2
0
ファイル: ExtensionCommand.php プロジェクト: WebDevJL/phpbrew
 public function describeExtension(Extension $ext)
 {
     $this->logger->write(sprintf(' [%s] %-12s %-12s', extension_loaded($ext->getExtensionName()) ? '*' : ' ', $ext->getExtensionName(), phpversion($ext->getExtensionName())));
     if ($this->options->{'show-path'}) {
         $this->logger->write(sprintf(' from %s', $ext->getConfigM4Path()));
     }
     $this->logger->newline();
     // $this->logger->writeln(sprintf('config: %s', $ext->getConfigFilePath()));
     if ($this->options->{'show-options'}) {
         $padding = '     ';
         if ($ext instanceof M4Extension) {
             $options = $ext->getConfigureOptions();
             if (!empty($options)) {
                 $this->logger->info($padding . 'Configure options:');
                 foreach ($options as $option) {
                     $this->logger->info($padding . '  ' . sprintf('%-32s %s', $option->option . ($option->valueHint ? '[=' . $option->valueHint . ']' : ''), $option->desc));
                 }
             }
         }
     }
 }