class FishCompletionOutput
@author Guillaume Aveline <guillaume.aveline@pm.me>
Hierarchy
- class \Symfony\Component\Console\Completion\Output\FishCompletionOutput implements \Symfony\Component\Console\Completion\Output\CompletionOutputInterface
Expanded class hierarchy of FishCompletionOutput
1 file declares its use of FishCompletionOutput
- CompleteCommand.php in vendor/
symfony/ console/ Command/ CompleteCommand.php
File
-
vendor/
symfony/ console/ Completion/ Output/ FishCompletionOutput.php, line 20
Namespace
Symfony\Component\Console\Completion\OutputView source
class FishCompletionOutput implements CompletionOutputInterface {
public function write(CompletionSuggestions $suggestions, OutputInterface $output) : void {
$values = [];
foreach ($suggestions->getValueSuggestions() as $value) {
$values[] = $value->getValue() . ($value->getDescription() ? "\t" . $value->getDescription() : '');
}
foreach ($suggestions->getOptionSuggestions() as $option) {
$values[] = '--' . $option->getName() . ($option->getDescription() ? "\t" . $option->getDescription() : '');
if ($option->isNegatable()) {
$values[] = '--no-' . $option->getName() . ($option->getDescription() ? "\t" . $option->getDescription() : '');
}
}
$output->write(implode("\n", $values));
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
FishCompletionOutput::write | public | function | Overrides CompletionOutputInterface::write |