Skip to content

ThomasWeinert/FluentDOM-HTML5

Repository files navigation

FluentDOM-HTML5

License CI Total Downloads Latest Stable Version Latest Unstable Version

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;

About

Adds HTML5 loader/serializer to FluentDOM

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages