PrintContext
final class PrintContext
PHP printing helpers and context.
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 expression node with the least amount of parentheses necessary to preserve the meaning.
Prints an array of nodes and implodes the printed values with $glue
No description
Ensures that expression evaluates to string or throws exception.
Details
at line 33
__construct(string $contentType = ContentType::Html, bool $migrationWarnings = false)
No description
at line 44
string
format(string $mask, mixed ...$args)
Expands %node, %dump, %raw, %args, %line, %escape(), %modify(), %modifyContent() in code.
at line 103
Escaper
beginEscape()
No description
at line 109
void
restoreEscape()
No description
at line 115
Escaper
getEscaper()
No description
at line 121
void
addBlock(Block $block)
No description
at line 137
int
generateId()
No description
at line 146
string
encodeString(string $str, string $quote = "'")
No description
at line 154
string
infixOp(Node $node, Node $leftNode, string $operatorString, Node $rightNode)
No description
at line 180
string
parenthesize(OperatorNode $parentNode, Node $childNode, int $childPosition)
Prints an expression node with the least amount of parentheses necessary to preserve the meaning.
at line 193
string
implode(array $nodes, string $glue = ', ')
Prints an array of nodes and implodes the printed values with $glue
at line 208
string
objectProperty(Node $node)
No description
at line 216
string
memberAsString(Node $node)
No description
at line 227
string
callExpr(Node $expr)
Wraps the LHS of a call in parentheses if needed.
at line 244
string
dereferenceExpr(Node $expr)
Wraps the LHS of a dereferencing operation in parentheses if needed.
at line 268
string
argumentsAsArray(array $args)
No description
at line 278
string
ensureString(ExpressionNode $name, string $entity)
Ensures that expression evaluates to string or throws exception.