GridTableBuilder
in package
FinalYes
Table of Contents
Properties
- $logger : LoggerInterface
Methods
- __construct() : mixed
- buildNode() : TableNode|null
- compile() : TableNode
- assertColumnEnded() : void
- buildColumn() : TableColumn
- buildRow() : TableRow
- concatenateTableRow() : array<int, TableRow>
- concatenateTableRows() : array<int, TableRow>
- createColumn() : TableColumn
- extractHeaderRows() : array<int, TableRow>
- extractRow() : TableRow
- extractTableCell() : void
- extractTableRows() : array<int, TableRow>
- findColumnInPreviousRows() : TableColumn
- findRowSpans() : array<int, bool>
- handlePartialSeparator() : array<int, TableRow>
- handlePreviousRowWasAPartialSeparator() : void
- hasRowSpan() : bool
- trimTableCellContents() : array<int, TableRow>
Properties
$logger read-only
private
LoggerInterface
$logger
Methods
__construct()
public
__construct(LoggerInterface $logger) : mixed
Parameters
- $logger : LoggerInterface
buildNode()
public
buildNode(ParserContext $tableParserContext, BlockContext $blockContext, RuleContainer $productions) : TableNode|null
Parameters
- $tableParserContext : ParserContext
- $blockContext : BlockContext
- $productions : RuleContainer
Return values
TableNode|nullcompile()
protected
compile(ParserContext $context) : TableNode
Parameters
- $context : ParserContext
Tags
Return values
TableNodeassertColumnEnded()
private
assertColumnEnded(int|null $currentColumnStart, int|null $previousColumnEnd) : void
Parameters
- $currentColumnStart : int|null
- $previousColumnEnd : int|null
Tags
buildColumn()
private
buildColumn(TableColumn $col, BlockContext $blockContext, RuleContainer $productions) : TableColumn
Parameters
- $col : TableColumn
- $blockContext : BlockContext
- $productions : RuleContainer
Return values
TableColumnbuildRow()
private
buildRow(TableRow $row, BlockContext $blockContext, RuleContainer $productions) : TableRow
Parameters
- $row : TableRow
- $blockContext : BlockContext
- $productions : RuleContainer
Return values
TableRowconcatenateTableRow()
private
concatenateTableRow(array<int, TableRow> $rows, int $rowIndex, array<int, bool> $partialSeparatorRows, TableRow $row) : array<int, TableRow>
Parameters
- $rows : array<int, TableRow>
- $rowIndex : int
- $partialSeparatorRows : array<int, bool>
- $row : TableRow
Return values
array<int, TableRow>concatenateTableRows()
private
concatenateTableRows(array<int, TableRow> $rows, ParserContext $context) : array<int, TableRow>
Parameters
- $rows : array<int, TableRow>
- $context : ParserContext
Tags
Return values
array<int, TableRow>createColumn()
private
createColumn(string $line, int $currentColumnStart, int|null $previousColumnEnd, int $currentSpan) : TableColumn
Parameters
- $line : string
- $currentColumnStart : int
- $previousColumnEnd : int|null
- $currentSpan : int
Return values
TableColumnextractHeaderRows()
private
extractHeaderRows(array<int, TableRow> &$rows, ParserContext $context) : array<int, TableRow>
Parameters
- $rows : array<int, TableRow>
- $context : ParserContext
Return values
array<int, TableRow>extractRow()
private
extractRow(array<int, int> $columnRanges, string $line, int &$currentSpan) : TableRow
Parameters
- $columnRanges : array<int, int>
- $line : string
- $currentSpan : int
Return values
TableRowextractTableCell()
private
extractTableCell(array<int, int> $columnRanges, int|null &$currentColumnStart, int|null &$previousColumnEnd, string $line, int &$currentSpan, TableRow $row) : void
Parameters
- $columnRanges : array<int, int>
- $currentColumnStart : int|null
- $previousColumnEnd : int|null
- $line : string
- $currentSpan : int
- $row : TableRow
extractTableRows()
private
extractTableRows(ParserContext $context) : array<int, TableRow>
Parameters
- $context : ParserContext
Return values
array<int, TableRow>findColumnInPreviousRows()
private
findColumnInPreviousRows(int $columnIndex, array<int, TableRow> $rows, int $currentRowIndex) : TableColumn
Parameters
- $columnIndex : int
- $rows : array<int, TableRow>
- $currentRowIndex : int
Return values
TableColumnfindRowSpans()
private
findRowSpans(ParserContext $context) : array<int, bool>
Parameters
- $context : ParserContext
Return values
array<int, bool>handlePartialSeparator()
private
handlePartialSeparator(TableRow $row, array<int, TableRow> $rows, int $rowIndex, array<int, int> &$columnIndexesCurrentlyInRowspan) : array<int, TableRow>
Parameters
- $row : TableRow
- $rows : array<int, TableRow>
- $rowIndex : int
- $columnIndexesCurrentlyInRowspan : array<int, int>
Tags
Return values
array<int, TableRow>handlePreviousRowWasAPartialSeparator()
private
handlePreviousRowWasAPartialSeparator(array<int, int> $columnIndexesCurrentlyInRowspan, array<int, TableRow> $rows, int $rowIndex, TableRow $row, ParserContext $context) : void
Parameters
- $columnIndexesCurrentlyInRowspan : array<int, int>
- $rows : array<int, TableRow>
- $rowIndex : int
- $row : TableRow
- $context : ParserContext
Tags
hasRowSpan()
private
hasRowSpan(string $line) : bool
Parameters
- $line : string
Return values
booltrimTableCellContents()
private
trimTableCellContents(array<int, TableRow> $rows) : array<int, TableRow>
Parameters
- $rows : array<int, TableRow>