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

getPaddingChar() public method

Returns the character used to pad cells to the desired width.
public getPaddingChar ( ) : string
return string The padding character.
    public function getPaddingChar()
    {
        return $this->paddingChar;
    }

Usage Example

コード例 #1
0
ファイル: Table.php プロジェクト: webmozart/console
 private function renderRows(IO $io, array $rows, array $columnLengths, $excessColumnLength, $indentation)
 {
     $alignments = $this->style->getColumnAlignments(count($columnLengths));
     $borderStyle = $this->style->getBorderStyle();
     $borderColumnLengths = array_map(function ($length) use($excessColumnLength) {
         return $length + $excessColumnLength;
     }, $columnLengths);
     BorderUtil::drawTopBorder($io, $borderStyle, $borderColumnLengths, $indentation);
     if ($this->headerRow) {
         BorderUtil::drawRow($io, $borderStyle, array_shift($rows), $columnLengths, $alignments, $this->style->getHeaderCellFormat(), $this->style->getHeaderCellStyle(), $this->style->getPaddingChar(), $indentation);
         BorderUtil::drawMiddleBorder($io, $borderStyle, $borderColumnLengths, $indentation);
     }
     foreach ($rows as $row) {
         BorderUtil::drawRow($io, $borderStyle, $row, $columnLengths, $alignments, $this->style->getCellFormat(), $this->style->getCellStyle(), $this->style->getPaddingChar(), $indentation);
     }
     BorderUtil::drawBottomBorder($io, $borderStyle, $borderColumnLengths, $indentation);
 }