phpDocumentor

TableParser
in package

Table of Contents

PRETTY_TABLE_HEADER  = '='
PRETTY_TABLE_JOINT  = '+'
PRETTY_TABLE_LETTER  = '-'
SIMPLE_TABLE_LETTER  = '='
SIMPLE_TABLE_LETTER_ALT  = '-'
guessTableType()  : string
parseTableSeparatorLine()  : TableSeparatorLineConfig|null
Parses a line from a table to see if it is a separator line.
findTableChars()  : array<string|int, string>|null
A "line" separator always has only two characters.

Constants

PRETTY_TABLE_HEADER

private mixed PRETTY_TABLE_HEADER = '='

PRETTY_TABLE_JOINT

private mixed PRETTY_TABLE_JOINT = '+'

PRETTY_TABLE_LETTER

private mixed PRETTY_TABLE_LETTER = '-'

SIMPLE_TABLE_LETTER

private mixed SIMPLE_TABLE_LETTER = '='

SIMPLE_TABLE_LETTER_ALT

private mixed SIMPLE_TABLE_LETTER_ALT = '-'

Methods

guessTableType()

public guessTableType(string $line) : string
Parameters
$line : string
Return values
string

parseTableSeparatorLine()

Parses a line from a table to see if it is a separator line.

public parseTableSeparatorLine(string $line) : TableSeparatorLineConfig|null

Returns TableSeparatorLineConfig if it is a separator, null otherwise.

Parameters
$line : string
Return values
TableSeparatorLineConfig|null

findTableChars()

A "line" separator always has only two characters.

private findTableChars(string $line) : array<string|int, string>|null

This method returns those two characters.

This returns null if this is not a separator line or it's malformed in any way.

Parameters
$line : string
Return values
array<string|int, string>|null

Search results