Serializer
class Serializer
Properties
XPathConvertor | $convertor | ||
protected array | $isVoid | ||
protected DOMXPath | $xpath |
Methods
Constructor
Convert an XPath expression (used in a condition) into PHP code
Convert an XPath expression (used as value) into PHP code
Convert an attribute value template into PHP
Convert a dynamic xsl:attribute/xsl:element name into PHP
Escape given literal
Escape the output of given PHP expression
Test whether given attribute declaration is a minimizable boolean attribute
Details
at line 36
__construct()
Constructor
at line 50
string
convertCondition(string $expr)
Convert an XPath expression (used in a condition) into PHP code
This method is similar to convertXPath() but it selectively replaces some simple conditions with the corresponding DOM method for performance reasons
at line 61
string
convertXPath(string $expr)
Convert an XPath expression (used as value) into PHP code
at line 78
string
serialize(DOMElement $ir)
Serialize the internal representation of a template into PHP
at line 100
protected string
convertAttributeValueTemplate(string $attrValue)
Convert an attribute value template into PHP
NOTE: escaping must be performed by the caller
at line 124
protected string
convertDynamicNodeName(string $attrValue)
Convert a dynamic xsl:attribute/xsl:element name into PHP
at line 141
protected string
escapeLiteral(string $text, string $context)
Escape given literal
at line 160
protected string
escapePHPOutput(string $php, string $context)
Escape the output of given PHP expression
at line 178
protected bool
hasMultipleCases(DOMElement $switch)
Test whether given switch has more than one non-default case
at line 190
protected bool
isBooleanAttribute(DOMElement $attribute, string $php)
Test whether given attribute declaration is a minimizable boolean attribute
at line 206
protected string
serializeApplyTemplates(DOMElement $applyTemplates)
Serialize an
at line 224
protected string
serializeAttribute(DOMElement $attribute)
Serialize an
at line 248
protected string
serializeChildren(DOMElement $ir)
Serialize all the children of given node into PHP
at line 269
protected string
serializeCloseTag(DOMElement $closeTag)
Serialize a
at line 299
protected string
serializeComment(DOMElement $comment)
Serialize a
at line 312
protected string
serializeCopyOfAttributes(DOMElement $copyOfAttributes)
Serialize a
at line 330
protected string
serializeElement(DOMElement $element)
Serialize an
at line 389
protected string
serializeHash(DOMElement $switch)
Serialize a
at line 417
protected string
serializeOutput(DOMElement $output)
Serialize an node
at line 441
protected string
serializeSwitch(DOMElement $switch)
Serialize a