PrintContext
final class PrintContext
PHP printing helpers and context.
The parts are based on great nikic/PHP-Parser project by Nikita Popov.
Properties
$paramsExtraction | |||
$blocks |
Methods
No description
Expands %node, %dump, %raw, %args, %line, %escape(), %modify(), %modifyContent() in code.
No description
No description
No description
No description
No description
Prints an array of nodes and implodes the printed values with $glue
No description
Details
at line 78
__construct(string $contentType = ContentType::Html)
No description
at line 87
string
format(string $mask, mixed ...$args)
Expands %node, %dump, %raw, %args, %line, %escape(), %modify(), %modifyContent() in code.
at line 142
Escaper
beginEscape()
No description
at line 148
void
restoreEscape()
No description
at line 154
Escaper
getEscaper()
No description
at line 160
void
addBlock(Block $block)
No description
at line 176
int
generateId()
No description
at line 185
string
encodeString(string $str, string $quote = "'")
No description
at line 196
string
infixOp(Node $node, Node $leftNode, string $operatorString, Node $rightNode)
Prints an infix operation while taking precedence into account.
at line 208
string
prefixOp(Node $node, string $operatorString, Node $expr)
Prints a prefix operation while taking precedence into account.
at line 218
string
postfixOp(Node $node, Node $var, string $operatorString)
Prints a postfix operation while taking precedence into account.
at line 255
string
implode(array $nodes, string $glue = ', ')
Prints an array of nodes and implodes the printed values with $glue
at line 270
string
objectProperty(Node $node)
No description
at line 278
string
memberAsString(Node $node)
No description
at line 289
string
callExpr(Node $expr)
Wraps the LHS of a call in parentheses if needed.
at line 309
string
dereferenceExpr(Node $expr)
Wraps the LHS of a dereferencing operation in parentheses if needed.
at line 336
string
argumentsAsArray(array $args)
No description