Webmozart\Console\UI\Style\TableStyle::asciiBorder PHP Method

asciiBorder() public static method

A style that uses ASCII characters for drawing borders.
public static asciiBorder ( ) : TableStyle
return TableStyle The style.
    public static function asciiBorder()
    {
        if (!self::$asciiBorder) {
            self::$asciiBorder = new static();
            self::$asciiBorder->headerCellFormat = ' %s ';
            self::$asciiBorder->cellFormat = ' %s ';
            self::$asciiBorder->borderStyle = BorderStyle::ascii();
        }
        return clone self::$asciiBorder;
    }

Usage Example

示例#1
0
 /**
  * Creates a new table.
  *
  * @param TableStyle $style The rendering style. By default, the table is
  *                          rendered with the style
  *                          {@link TableStyle::asciiBorder()}.
  */
 public function __construct(TableStyle $style = null)
 {
     $this->style = $style ?: TableStyle::asciiBorder();
 }
All Usage Examples Of Webmozart\Console\UI\Style\TableStyle::asciiBorder