Parser
class Parser extends ParserBase
Properties
protected array | $config | from ParserBase | |
protected Parser | $parser | from ParserBase | |
protected int | $pos | ||
protected array | $table | ||
protected Tag | $tableTag | ||
protected array[] | $tables | ||
protected string | $text |
Methods
No description
Add current line to a table
Process current table's body
Add a cell's tags for current table at current position
Process current table's head
Process given table row
Capture all pipe tables in current text
Create a pair of TBODY tags for given text span
Create a pair of TD or TH tags for given text span
Create a pair of THEAD tags for given text span
Create an ignore tag for given text span
Create a pair of TR tags for given text span
Create an ignore tag for given separator row
Create a pair of TABLE tags for given text span
End current buffered table
Test whether a valid table is currently buffered
Test whether given line is a valid separator
Overwrite right angle brackets in given match
Overwrite escape sequences in current text
Overwrite backticks in given match
Overwrite Markdown-style markup in current text
Parse and return column alignments in given separator line
Process current table declaration
Process all the captured tables
Details
in
ParserBase at line 30
final
__construct(Parser $parser, array $config)
Constructor
in
ParserBase at line 43
protected void
setUp()
Plugin's setup
at line 42
void
parse(string $text, array $matches)
No description
at line 67
protected void
addLine(string $line)
Add current line to a table
at line 93
protected void
addTableBody()
Process current table's body
at line 113
protected void
addTableCell(string $tagName, string $align, string $content)
Add a cell's tags for current table at current position
at line 141
protected void
addTableHead()
Process current table's head
at line 154
protected void
addTableRow(string $tagName, array $row)
Process given table row
at line 177
protected void
captureTables()
Capture all pipe tables in current text
at line 205
protected void
createBodyTags(int $startPos, int $endPos)
Create a pair of TBODY tags for given text span
at line 219
protected void
createCellTags(string $tagName, int $startPos, int $endPos, string $align)
Create a pair of TD or TH tags for given text span
at line 242
protected void
createHeadTags(int $startPos, int $endPos)
Create a pair of THEAD tags for given text span
at line 254
protected void
createIgnoreTag(int $pos, int $len)
Create an ignore tag for given text span
at line 266
protected void
createRowTags(int $startPos, int $endPos)
Create a pair of TR tags for given text span
at line 277
protected void
createSeparatorTag(array $row)
Create an ignore tag for given separator row
at line 289
protected void
createTableTags(int $startPos, int $endPos)
Create a pair of TABLE tags for given text span
at line 299
protected void
endTable()
End current buffered table
at line 314
protected bool
hasValidTable()
Test whether a valid table is currently buffered
at line 325
protected bool
isValidSeparator(string $line)
Test whether given line is a valid separator
at line 336
protected string
overwriteBlockquoteCallback(array $m)
Overwrite right angle brackets in given match
at line 346
protected void
overwriteEscapes()
Overwrite escape sequences in current text
at line 360
protected string
overwriteInlineCodeCallback(array $m)
Overwrite backticks in given match
at line 370
protected void
overwriteMarkdown()
Overwrite Markdown-style markup in current text
at line 391
protected string[]
parseColumnAlignments(string $line)
Parse and return column alignments in given separator line
at line 417
protected void
processCurrentTable()
Process current table declaration
at line 433
protected void
processTables()
Process all the captured tables