Exemple #1
0
 protected function showSwitchDetails(Context $context, $sortedSwitches)
 {
     $so = $context->stdout;
     // keep track of the switches we have seen, to avoid
     // any duplication of output
     $seenSwitches = array();
     foreach ($sortedSwitches['allSwitches'] as $shortOrLongSwitch => $switch) {
         // have we already seen this switch?
         if (isset($seenSwitches[$switch->name])) {
             // yes, skip it
             continue;
         }
         $seenSwitches[$switch->name] = $switch;
         // we have not seen this switch before
         SwitchesHelper::showSwitchLongDetails($context, $switch);
     }
 }
Exemple #2
0
 protected function showPhixSwitchDetails(Context $context, $sortedSwitches)
 {
     $so = $context->stdout;
     $so->setIndent(0);
     $so->outputLine(null, 'OPTIONS');
     $so->addIndent(4);
     $so->outputLine(null, 'Use the following switches in front of any <command> to have the following effects.');
     $so->outputBlankLine();
     // keep track of the switches we have seen, to avoid
     // any duplication of output
     $seenSwitches = array();
     foreach ($sortedSwitches['allSwitches'] as $shortOrLongSwitch => $switch) {
         // have we already seen this switch?
         if (isset($seenSwitches[$switch->name])) {
             // yes, skip it
             continue;
         }
         $seenSwitches[$switch->name] = $switch;
         // we have not seen this switch before
         SwitchesHelper::showSwitchLongDetails($context, $switch);
     }
 }