Documentation

TableStartParser
in package
implements BlockStartParserInterface

FinalYes

Table of Contents

Interfaces

BlockStartParserInterface
Interface for a block parser which identifies block starts.

Properties

$maxAutocompletedCells  : int

Methods

__construct()  : mixed
tryStart()  : BlockStart|null
Check whether we should handle the block at the current position
getAlignment()  : string|null
parseSeparator()  : array<int, string|null>

Properties

Methods

__construct()

public __construct([int $maxAutocompletedCells = TableParser::DEFAULT_MAX_AUTOCOMPLETED_CELLS ]) : mixed
Parameters
$maxAutocompletedCells : int = TableParser::DEFAULT_MAX_AUTOCOMPLETED_CELLS

tryStart()

Check whether we should handle the block at the current position

public tryStart(Cursor $cursor, MarkdownParserStateInterface $parserState) : BlockStart|null
Parameters
$cursor : Cursor

A cloned copy of the cursor at the current parsing location

$parserState : MarkdownParserStateInterface

Additional information about the state of the Markdown parser

Return values
BlockStart|null

The BlockStart that has been identified, or null if the block doesn't match here

getAlignment()

private static getAlignment(bool $left, bool $right) : string|null
Parameters
$left : bool
$right : bool
Tags
psalm-return

TableCell::ALIGN_*|null

phpstan-return

TableCell::ALIGN_*|null

psalm-pure
Return values
string|null

parseSeparator()

private static parseSeparator(Cursor $cursor) : array<int, string|null>
Parameters
$cursor : Cursor
Tags
psalm-return

array<int, TableCell::ALIGN_*|null>

phpstan-return

array<int, TableCell::ALIGN_*|null>

Return values
array<int, string|null>

        
On this page

Search results