fluentdom / html5
HTML5 support for FluentDOM
Installs: 27 600
Dependents: 1
Suggesters: 0
Security: 0
Stars: 7
Watchers: 4
Forks: 2
Open Issues: 2
Requires
- php: >=7.2
- ext-dom: *
- fluentdom/fluentdom: ^8.0.0
- masterminds/html5: ^2.7.0
Requires (Dev)
README
Adds support for HTML5 to FluentDOM. It adds a loader and a serializer. It uses the HTML5-PHP library.
Installation
composer require fluentdom/html5
Loader
The loader registers automatically. You can trigger it with the types html5
and text/html5
.
$document = FluentDOM::load($html5, 'text/html5'); $query = FluentDOM($html5, 'text/html5');
Serializer
The serializer needs to be created with a document and can be cast into a string.
echo new FluentDOM\Html5\Serializer($document);
Casting a Nodes/Query instance to a string will use it if the content type matches:
$query = FluentDOM($html5, 'text/html5'); echo $query;