isOptional() public method

public isOptional ( )
Exemplo n.º 1
0
 public function renderOptionValueHint(Option $opt, $assign = true)
 {
     $n = 'value';
     if ($opt->valueName) {
         $n = $opt->valueName;
     } elseif ($opt->isa) {
         $n = $opt->isa;
     }
     if ($opt->isRequired()) {
         return sprintf('%s<%s>', $assign ? '=' : ' ', $this->formatter->format($n, 'underline'));
     } elseif ($opt->isOptional()) {
         return sprintf('%s[<%s>]', $assign ? '=' : ' ', $this->formatter->format($n, 'underline'));
     }
     return '';
 }