Dodo
DOm DOcument implementation
|
Static Public Member Functions | |
static int | compare_document_position (Node $node1, Node $node2) |
static string | locate_namespace (Node $node, ?string $prefix) |
static string | locate_prefix (Node $node, ?string $ns) |
static | insert_before_or_replace (Node $child, ContainerNode $parent, ?Node $before, bool $replace) |
static | ensure_insert_valid (Node $node, Node $parent, ?Node $child) |
TODO: Look at the way these were implemented in the original; there are some speedups esp in the way that you implement things like "node has a doctype child that is not child. | |
static | ensure_replace_valid (Node $node, Node $parent, Node $child) |
static | descendantTextContent (Node $node, array &$bits) |
Return the "descendant text content" of the given node. | |
static string | _helper_escape ( $s) |
static string | _helper_escapeAttr ( $s) |
static string | _helper_attrname (Attr $a) |
static | xmlSerialize (Node $node, array $options, array &$markup) |
The "XML serialization" algorithm. | |
static | xmlSerializeElement (Element $el, ?string $namespace, NamespacePrefixMap $prefixMap, int &$prefixIndex, array $options, array &$markup) |
XML serializing an Element node. | |
static | xmlSerializeAttributes (NamedNodeMap $attributes, NamespacePrefixMap $map, int &$prefixIndex, array &$localPrefixesMap, bool $ignoreNamespaceDefinitionAttribute, array $options, array &$markup) |
XML serialization of the attributes of an element. | |
static | xmlSerializeAttrValue (?string $value, array $options, array &$markup) |
Serialize an attribute value (for XML). | |
static | htmlSerialize (array &$result, Node $child, ?Node $parent, array $options=[]) |
This is part of the "HTML fragment serialization algorithm". | |
static bool | is_valid_xml_chars ( $s) |
static bool | is_valid_xml_name ( $s) |
static bool | is_valid_xml_qname ( $s) |
static void | validate_and_extract (?string &$ns, string $qname, ?string &$prefix, ?string &$lname) |
Validate and extract a namespace and qualifiedName. | |
|
static |
Attr | $a |
|
static |
string | $s |
|
static |
string | $s |
|
static |
Node | $node1 | |
Node | $node2 |
|
static |
Return the "descendant text content" of the given node.
Node | $node | |
string[] | &$bits | the result is returned in this array |
|
static |
TODO: Look at the way these were implemented in the original; there are some speedups esp in the way that you implement things like "node has a doctype child that is not child.
Node | $node | |
Node | $parent | |
?Node | $child |
|
static |
Node | $node | |
Node | $parent | |
Node | $child |
|
static |
This is part of the "HTML fragment serialization algorithm".
array<string> | &$result | |
Node | $child | |
?Node | $parent | This is null when evaluating outerHtml |
array | $options |
|
static |
Node | $child | |
ContainerNode | $parent | |
?Node | $before | |
bool | $replace |
|
static |
string | $s |
|
static |
string | $s |
|
static |
|
static |
Node | $node | |
?string | $prefix |
|
static |
Node | $node | |
?string | $ns |
|
static |
Validate and extract a namespace and qualifiedName.
Used to map (namespace, qualifiedName) => (namespace, prefix, localName)
?string | &$ns | |
string | $qname | |
?string | &$prefix | reference (will be NULL or contain prefix string) |
?string | &$lname | reference (will be qname or contain lname string) |
DOMException | "NamespaceError" |
|
static |
The "XML serialization" algorithm.
Node | $node | |
array | $options | |
string[] | &$markup |
|
static |
XML serialization of the attributes of an element.
NamedNodeMap | $attributes | |
NamespacePrefixMap | $map | |
int | &$prefixIndex | |
array<string,string> | &$localPrefixesMap | |
bool | $ignoreNamespaceDefinitionAttribute | |
array | $options | |
string[] | &$markup | accumulator for the result |
|
static |
Serialize an attribute value (for XML).
?string | $value | |
array | $options | |
string[] | &$markup |
|
static |
XML serializing an Element node.
Moved here from Element::_xmlSerialize because it's huge!
Element | $el | |
?string | $namespace | |
NamespacePrefixMap | $prefixMap | |
int | &$prefixIndex | |
array | $options | |
string[] | &$markup | accumulator for the result |