isUnderlined() public method

Returns whether the text is underlined.
public isUnderlined ( ) : boolean
return boolean Returns `true` if text is formatted underlined and `false` otherwise.
Exemplo n.º 1
0
 public function testDefaults()
 {
     $style = new Style();
     $this->assertNull($style->getTag());
     $this->assertNull($style->getForegroundColor());
     $this->assertNull($style->getBackgroundColor());
     $this->assertFalse($style->isBold());
     $this->assertFalse($style->isUnderlined());
     $this->assertFalse($style->isBlinking());
     $this->assertFalse($style->isHidden());
     $this->assertFalse($style->isInverse());
 }
Exemplo n.º 2
0
 /**
  * Converts a {@link Style} instance to an {@link OutputFormatterStyle}.
  *
  * @param Style $style The style to convert.
  *
  * @return OutputFormatterStyle The converted style.
  */
 public static function convert(Style $style)
 {
     $options = array();
     if ($style->isBold()) {
         $options[] = 'bold';
     }
     if ($style->isBlinking()) {
         $options[] = 'blink';
     }
     if ($style->isUnderlined()) {
         $options[] = 'underscore';
     }
     if ($style->isInverse()) {
         $options[] = 'reverse';
     }
     if ($style->isHidden()) {
         $options[] = 'conceal';
     }
     return new OutputFormatterStyle($style->getForegroundColor(), $style->getBackgroundColor(), $options);
 }