Documentation

BlockParser extends AbstractParser
in package

Tags
extends

Table of Contents

Properties

$BLOCK_END  : non-empty-string
$BLOCK_START  : non-empty-string
$END_OF_LINE_CHARS  : array<string|int, non-empty-string>

Methods

getBlockContent()  : string
getHandledTokenClass()  : TToken>
Get the token class that this parser handles
isBlockEnd()  : bool
Check if the current char is the end of a block
isBlockStart()  : bool
Check if the current char is the start of a block
parseCurrentContext()  : TToken|LintError|null
Performs parsing tokenizer current context, check block part
handleTokenForCurrentContext()  : TToken|LintError|null
lastCharIsSpace()  : bool
removeEndingString()  : string
removeStartingString()  : string
stringIsSpace()  : bool
createBlockToken()  : BlockToken
Creates a BlockToken from the current context
handleBlockToken()  : BlockToken|null
updateBlockToken()  : BlockToken

Properties

$BLOCK_END

public static non-empty-string $BLOCK_END = '}'

$BLOCK_START

public static non-empty-string $BLOCK_START = '{'

$END_OF_LINE_CHARS

public static array<string|int, non-empty-string> $END_OF_LINE_CHARS = ["\r\n", "\n"]

Methods

getHandledTokenClass()

Get the token class that this parser handles

public getHandledTokenClass() : TToken>
Return values
TToken>

isBlockEnd()

Check if the current char is the end of a block

public static isBlockEnd(TokenizerContext $tokenizerContext[, bool $fullContent = false ]) : bool
Parameters
$tokenizerContext : TokenizerContext
$fullContent : bool = false
Return values
bool

parseCurrentContext()

Performs parsing tokenizer current context, check block part

public parseCurrentContext(TokenizerContext $tokenizerContext) : TToken|LintError|null
Parameters
$tokenizerContext : TokenizerContext

The context of the tokenizer to parse.

Return values
TToken|LintError|null

A token if parsing is successful, an error if there is an issue, or null if no action is taken.

handleTokenForCurrentContext()

protected handleTokenForCurrentContext(TokenizerContext $tokenizerContext, Warning: Array to string conversion in /opt/phpdoc/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 70 Warning: Array to string conversion in /opt/phpdoc/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 78 callable(Array): Array $generateToken) : TToken|LintError|null
Parameters
$tokenizerContext : TokenizerContext
$generateToken : Warning: Array to string conversion in /opt/phpdoc/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 70 Warning: Array to string conversion in /opt/phpdoc/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 78 callable(Array): Array
Return values
TToken|LintError|null

removeEndingString()

protected static removeEndingString(string $content, string $search) : string
Parameters
$content : string
$search : string
Return values
string

removeStartingString()

protected static removeStartingString(string $content, string $search) : string
Parameters
$content : string
$search : string
Return values
string

stringIsSpace()

protected stringIsSpace(string $char) : bool
Parameters
$char : string
Return values
bool

        
On this page

Search results