PrintContext
final class PrintContext
PHP printing helpers and context.
Constants
private Left |
associativity |
private None |
associativity |
private Right |
associativity |
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
Ensures that expression evaluates to string or throws exception.
Details
at line 80
__construct(string $contentType = ContentType::Html)
No description
at line 89
string
format(string $mask, mixed ...$args)
Expands %node, %dump, %raw, %args, %line, %escape(), %modify(), %modifyContent() in code.
at line 148
Escaper
beginEscape()
No description
at line 154
void
restoreEscape()
No description
at line 160
Escaper
getEscaper()
No description
at line 166
void
addBlock(Block $block)
No description
at line 182
int
generateId()
No description
at line 191
string
encodeString(string $str, string $quote = "'")
No description
at line 202
string
infixOp(Node $node, Node $leftNode, string $operatorString, Node $rightNode)
Prints an infix operation while taking precedence into account.
at line 214
string
prefixOp(Node $node, string $operatorString, Node $expr)
Prints a prefix operation while taking precedence into account.
at line 223
string
postfixOp(Node $node, Node $var, string $operatorString)
Prints a postfix operation while taking precedence into account.
at line 269
string
implode(array $nodes, string $glue = ', ')
Prints an array of nodes and implodes the printed values with $glue
at line 284
string
objectProperty(Node $node)
No description
at line 292
string
memberAsString(Node $node)
No description
at line 303
string
callExpr(Node $expr)
Wraps the LHS of a call in parentheses if needed.
at line 323
string
dereferenceExpr(Node $expr)
Wraps the LHS of a dereferencing operation in parentheses if needed.
at line 350
string
argumentsAsArray(array $args)
No description
at line 360
string
ensureString(ExpressionNode $name, string $entity)
Ensures that expression evaluates to string or throws exception.