public static function getSerializerFactories()
{
if (!self::$_serializerFactories instanceof FluentDOM\Serializer\Factory) {
$xml = function ($contentType, \DOMNode $node) {
return new FluentDOM\Serializer\Xml($node);
};
$html = function ($contentType, \DOMNode $node) {
return new FluentDOM\Serializer\Html($node);
};
$json = function ($contentType, \DOMNode $node) {
return new FluentDOM\Serializer\Json($node);
};
self::$_serializerFactories = new FluentDOM\Serializer\Factory\Group(['text/html' => $html, 'html' => $html, 'text/xml' => $xml, 'xml' => $xml, 'text/json' => $json, 'json' => $json]);
}
return self::$_serializerFactories;
}