BlueSpice MediaWiki master
|
Public Member Functions | |
__construct ($options=[]) | |
startDocument ($fragmentNamespace, $fragmentName) | |
characters (SerializerNode $parent, $text, $start, $length) | |
element (SerializerNode $parent, SerializerNode $node, $contents) | |
comment (SerializerNode $parent, $text) | |
doctype ($name, $public, $system) | |
formatDOMNode (\DOMNode $node) | |
formatDOMElement (\DOMElement $node, $contents) | |
Public Attributes | |
xc2 | xa0 |
Protected Attributes | |
$voidElements | |
$prefixLfElements | |
$rawTextElements | |
$attributeEscapes | |
$textEscapes | |
$unqualifiedNamespaces | |
$useSourceDoctype | |
$reverseCoercion | |
A formatter which follows the HTML 5 fragment serialization algorithm.
RemexHtml\Serializer\HtmlFormatter::__construct | ( | $options = [] | ) |
Constructor.
array | $options | An associative array of options:
|
RemexHtml\Serializer\HtmlFormatter::characters | ( | SerializerNode | $parent, |
$text, | |||
$start, | |||
$length | |||
) |
Encode the given character substring
SerializerNode | $parent | The parent of the text node (at creation time) |
string | $text | |
integer | $start | The offset within $text |
integer | $length | The number of bytes within $text |
Implements RemexHtml\Serializer\Formatter.
RemexHtml\Serializer\HtmlFormatter::comment | ( | SerializerNode | $parent, |
$text | |||
) |
Encode a comment
SerializerNode | $parent | The parent of the node (at creation time) |
string | $text | The inner text of the comment |
Implements RemexHtml\Serializer\Formatter.
RemexHtml\Serializer\HtmlFormatter::doctype | ( | $name, | |
$public, | |||
$system | |||
) |
Encode a doctype. This event occurs when the source document has a doctype, it can return an empty string if the formatter wants to use its own doctype.
string | $name | The doctype name, usually "html" |
string | $public | The PUBLIC identifier |
string | $system | The SYSTEM identifier |
Implements RemexHtml\Serializer\Formatter.
RemexHtml\Serializer\HtmlFormatter::element | ( | SerializerNode | $parent, |
SerializerNode | $node, | ||
$contents | |||
) |
Encode the given element
SerializerNode | $parent | The parent of the node (when it is closed) |
SerializerNode | $node | The element to encode |
string | null | $contents | The previously-encoded contents, or null for a void element. Void elements can be serialized as self-closing tags. |
Implements RemexHtml\Serializer\Formatter.
RemexHtml\Serializer\HtmlFormatter::formatDOMElement | ( | \DOMElement | $element, |
$contents | |||
) |
Non-recursively format a DOMElement.
DOMElement | $element | The element to format |
string | $contents | The formatted contents of the element |
Implements RemexHtml\DOM\DOMFormatter.
RemexHtml\Serializer\HtmlFormatter::formatDOMNode | ( | \DOMNode | $node | ) |
Recursively format a DOMNode.
DOMNode | $node | The node to format |
Implements RemexHtml\DOM\DOMFormatter.
RemexHtml\Serializer\HtmlFormatter::startDocument | ( | $fragmentNamespace, | |
$fragmentName | |||
) |
Get a string which starts the document
string | null | $fragmentNamespace | |
string | null | $fragmentName |
Implements RemexHtml\Serializer\Formatter.
|
protected |
The escape table for attribute values
|
protected |
The elements which need a leading newline in their contents to be duplicated, since the parser strips a leading newline.
|
protected |
The elements which have unescaped contents.
|
protected |
The escape table for text nodes
|
protected |
Attribute namespaces which have unqualified local names
|
protected |
The elements for which a closing tag is omitted.
xc2 RemexHtml\Serializer\HtmlFormatter::xa0 |