From bb6b4cbfff296170a62ccff603c157761e36e93f Mon Sep 17 00:00:00 2001 From: gulch Date: Fri, 28 Oct 2022 21:06:05 +0300 Subject: [PATCH] optional param specifying to format the content --- src/Suin/RSSWriter/Feed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Suin/RSSWriter/Feed.php b/src/Suin/RSSWriter/Feed.php index e805049..7dd015a 100644 --- a/src/Suin/RSSWriter/Feed.php +++ b/src/Suin/RSSWriter/Feed.php @@ -28,7 +28,7 @@ public function addChannel(ChannelInterface $channel) * Render XML * @return string */ - public function render() + public function render($isOutputFormatted = true) { $xml = new SimpleXMLElement('', LIBXML_NOERROR | LIBXML_ERR_NONE | LIBXML_ERR_FATAL); @@ -40,7 +40,7 @@ public function render() $dom = new DOMDocument('1.0', 'UTF-8'); $dom->appendChild($dom->importNode(dom_import_simplexml($xml), true)); - $dom->formatOutput = true; + $dom->formatOutput = $isOutputFormatted; return $dom->saveXML(); }