Adds support for YAML to FluentDOM. It adds a loader and a serializer. It uses the Dipper library.
NOTE: At the moment a fork of Dipper is used.
This plugin needs FluentDOM 5.2.1 aka the current development version.
composer require fluentdom/yaml-dipper
The loader registers automatically. You can trigger it with the types yaml
and text/yaml
.
$document = FluentDOM::load($yaml, 'text/yaml');
$query = FluentDOM($yaml, 'text/yaml');
The serializer needs to be created with for document and can be casted into a string.
echo new FluentDOM\YAML\Dipper\Serializer($document);