diff --git a/README.md b/README.md index 282f879..f0bc15e 100644 --- a/README.md +++ b/README.md @@ -45,61 +45,4 @@ This library and [masterminds/html5](https://packagist.org/packages/masterminds/ † With HTML namespace disabled. With HTML namespace enabled it does not finish in a reasonable time due to a PHP bug. -‡ With parse errors suppressed. Reporting parse errors adds approximately 10% overhead. - -## Document Object Model ## - -This library works by parsing HTML strings into PHP's existing XML DOM. It, however, has to force the antiquated PHP DOM extension into working properly with modern HTML DOM by extending many of the node types. The documentation below follows PHP's doc style guide with the exception of inherited methods and properties not being listed. Therefore, only new constants, properties, and methods will be listed; in addition, extended methods which change outward behavior from their parent class will be listed. - -### MensBeam\\HTML\\Document ### - -```php -MensBeam\HTML\Document extends \DOMDocument { - - /* Constants */ - public const NO_QUIRKS_MODE = 0; - public const QUIRKS_MODE = 1; - public const LIMITED_QUIRKS_MODE = 2; - - /* Properties */ - public string|null $documentEncoding = null; - public int $quirksMode = 0; - - /* Methods */ - public load ( string $filename , null $options = null , string|null $encodingOrContentType = null ) : bool - public loadHTML ( string $source , null $options = null , string|null $encodingOrContentType = null ) : bool - public loadHTMLFile ( string $filename , null $options = null , string|null $encodingOrContentType = null ) : bool - public loadXML ( string $source , null $options = null ) : false - public save ( string $filename , null $options = null ) : int|false - public saveXML ( DOMNode|null $node = null , null $options = null ) : false - public validate ( ) : true - public xinclude ( null $options = null ) : false - -} -``` - -#### Properties #### - -
-
documentEncoding
-
Encoding of the document, as specified when parsing or when determining encoding type.
-
quirksMode
-
Used when parsing. Can be not in quirks mode, quirks mode, or limited quirks mode. See the `MensBeam\HTML\Document` constants to see the valid values.
-
- -The following properties inherited from `\DOMDocument` have no effect on `Mensbeam\HTML\Document`: - -* actualEncoding -* config -* encoding -* formatOutput -* preserveWhiteSpace -* recover -* resolveExternals -* standalone -* substituteEntities -* validateOnParse -* version -* xmlEncoding -* xmlStandalone -* xmlVersion \ No newline at end of file +‡ With parse errors suppressed. Reporting parse errors adds approximately 10% overhead. \ No newline at end of file diff --git a/lib/DOM/Comment.php b/lib/DOM/Comment.php index 5d8e66a..d492b0c 100644 --- a/lib/DOM/Comment.php +++ b/lib/DOM/Comment.php @@ -7,7 +7,7 @@ declare(strict_types=1); namespace MensBeam\HTML; class Comment extends \DOMComment { - use C14N, Moonwalk; + use Moonwalk, Node; public function __toString(): string { # Append the literal string "