ConstExprParser
in package
Table of Contents
- $parseDoctrineStrings : bool
- $quoteAwareConstExprString : bool
- $unescapeStrings : bool
- $useIndexAttributes : bool
- $useLinesAttributes : bool
- __construct() : mixed
- parse() : ConstExprNode
- parseDoctrineString() : DoctrineConstExprStringNode
- This method is supposed to be called with TokenIterator after reading TOKEN_DOUBLE_QUOTED_STRING and shifting to the next token.
- enrichWithAttributes() : T
- parseArray() : ConstExprArrayNode
- parseArrayItem() : ConstExprArrayItemNode
Properties
$parseDoctrineStrings
private
bool
$parseDoctrineStrings
$quoteAwareConstExprString
private
bool
$quoteAwareConstExprString
$unescapeStrings
private
bool
$unescapeStrings
$useIndexAttributes
private
bool
$useIndexAttributes
$useLinesAttributes
private
bool
$useLinesAttributes
Methods
__construct()
public
__construct([bool $unescapeStrings = false ][, bool $quoteAwareConstExprString = false ][, array{lines?: bool, indexes?: bool} $usedAttributes = [] ]) : mixed
Parameters
- $unescapeStrings : bool = false
- $quoteAwareConstExprString : bool = false
- $usedAttributes : array{lines?: bool, indexes?: bool} = []
Return values
mixed —parse()
public
parse(TokenIterator $tokens[, bool $trimStrings = false ]) : ConstExprNode
Parameters
- $tokens : TokenIterator
- $trimStrings : bool = false
Return values
ConstExprNode —parseDoctrineString()
This method is supposed to be called with TokenIterator after reading TOKEN_DOUBLE_QUOTED_STRING and shifting to the next token.
public
parseDoctrineString(string $text, TokenIterator $tokens) : DoctrineConstExprStringNode
Parameters
- $text : string
- $tokens : TokenIterator
Return values
DoctrineConstExprStringNode —enrichWithAttributes()
private
enrichWithAttributes(TokenIterator $tokens, T $node, int $startLine, int $startIndex) : T
Parameters
- $tokens : TokenIterator
- $node : T
- $startLine : int
- $startIndex : int
Tags
Return values
T —parseArray()
private
parseArray(TokenIterator $tokens, int $endToken, int $startIndex) : ConstExprArrayNode
Parameters
- $tokens : TokenIterator
- $endToken : int
- $startIndex : int
Return values
ConstExprArrayNode —parseArrayItem()
private
parseArrayItem(TokenIterator $tokens) : ConstExprArrayItemNode
Parameters
- $tokens : TokenIterator