FoldArithmeticConstants
class FoldArithmeticConstants extends AbstractConstantFolding
Constants
XMLNS_XSL |
XSL namespace |
Properties
protected Document | $ownerDocument | from AbstractNormalization | |
protected array | $queries | {@inheritdoc} | from AbstractConstantFolding |
Methods
Apply this normalization rule to given template
Create an xsl:text element or a text node in current template
Replace constant expressions in given attribute's AVT
Replace constant expressions in given XSL element
Return the optimization passes supported by the concrete implementation
Evaluate given expression and return the result
Remove "+ 0" additions
Evaluate and return the result of a division
Evaluate and return the result of a multiplication
Evaluate and replace a constant operation
Evaluate and return the result of a simple subexpression
Remove the parentheses around an integer
Details
in
AbstractNormalization at line 40
void
normalize(Element $template)
Apply this normalization rule to given template
in
AbstractNormalization at line 57
protected Text
createPolymorphicText(string $textContent)
Create an xsl:text element or a text node in current template
in
AbstractNormalization at line 69
protected array
getNodes()
Query and return a list of nodes of interest
in
AbstractNormalization at line 83
protected bool
isXsl(DOMNode $node, string $localName = null)
Test whether given node is an XSL element
in
AbstractNormalization at line 94
protected string
lowercase(string $str)
Make an ASCII string lowercase
in
AbstractConstantFolding at line 54
protected void
normalizeAttribute(Attr $attribute)
Replace constant expressions in given attribute's AVT
in
AbstractNormalization at line 103
protected void
normalizeCdataSection(CdataSection $comment)
No description
in
AbstractNormalization at line 107
protected void
normalizeComment(Comment $comment)
No description
in
AbstractConstantFolding at line 76
protected void
normalizeElement(Element $element)
Replace constant expressions in given XSL element
in
AbstractNormalization at line 115
protected void
normalizeNode(DOMNode $node)
No description
in
AbstractNormalization at line 139
protected void
normalizeText(Text $node)
No description
in
AbstractNormalization at line 146
protected void
reset()
Reset this instance's properties after usage
at line 18
protected array
getOptimizationPasses()
Return the optimization passes supported by the concrete implementation
at line 36
protected string
evaluateExpression(string $expr)
Evaluate given expression and return the result
at line 51
protected string
foldAdditiveIdentity(array $m)
Remove "+ 0" additions
at line 62
protected string
foldDivision(array $m)
Evaluate and return the result of a division
at line 73
protected string
foldMultiplication(array $m)
Evaluate and return the result of a multiplication
at line 84
protected string
foldOperation(array $m)
Evaluate and replace a constant operation
at line 95
protected string
foldSubExpression(array $m)
Evaluate and return the result of a simple subexpression
at line 106
protected string
removeParentheses(array $m)
Remove the parentheses around an integer