// add the width of the following columns(numbers of colspan).
foreach (range($column + 1,
$column +
$cell->
getColspan() - 1
) as $nextColumn) { $width +=
$this->
getColumnSeparatorWidth() +
$this->effectiveColumnWidths
[$nextColumn];
} } // str_pad won't work properly with multi-byte strings, we need to fix the padding
if (false !==
$encoding =
mb_detect_encoding($cell, null, true
)) { $width += \
strlen($cell) -
mb_strwidth($cell,
$encoding);
} $style =
$this->
getColumnStyle($column);
if ($cell instanceof TableSeparator
) { return sprintf($style->
getBorderFormat(),
str_repeat($style->
getBorderChars()[2
],
$width));
} $width += Helper::
length($cell) - Helper::
length(Helper::
removeDecoration($this->output->
getFormatter(),
$cell));
$content =
sprintf($style->
getCellRowContentFormat(),
$cell);
$padType =
$style->
getPadType();
if ($cell instanceof TableCell &&
$cell->
getStyle() instanceof TableCellStyle
) { $isNotStyledByTag = !
preg_match('/^<(\w+|(\w+=[\w,]+;?)*)>.+<\/(\w+|(\w+=\w+;?)*)?>$/',
$cell);