X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fxmloutputter.php;h=5f06e491df2c2182fef496be074d419efe5c987c;hb=69ac99ff949ab0118ff25a62471980ad0ec7a52b;hp=5bbd35627eb5a1650ab1d7773fff92723ef4b6b1;hpb=10fcbe9da3456d7f7c07bd1192051602bd8b0762;p=quix0rs-gnu-social.git diff --git a/lib/xmloutputter.php b/lib/xmloutputter.php index 5bbd35627e..5f06e491df 100644 --- a/lib/xmloutputter.php +++ b/lib/xmloutputter.php @@ -1,6 +1,6 @@ . * * @category Output - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli - * @copyright 2008 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli + * @copyright 2008 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -40,11 +40,11 @@ if (!defined('LACONICA')) { * an element. * * @category Output - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * @see Action * @see HTMLOutputter */ @@ -72,7 +72,6 @@ class XMLOutputter $this->xw = new XMLWriter(); $this->xw->openURI($output); $this->xw->setIndent($indent); - $this->xw->startDocument('1.0', 'UTF-8'); } /** @@ -87,6 +86,7 @@ class XMLOutputter function startXML($doc=null, $public=null, $system=null) { + $this->xw->startDocument('1.0', 'UTF-8'); if ($doc) { $this->xw->writeDTD($doc, $public, $system); } @@ -226,4 +226,17 @@ class XMLOutputter { $this->xw->writeRaw($xml); } + + /** + * output a comment + * + * @param string $txt text of the comment + * + * @return void + */ + + function comment($txt) + { + $this->xw->writeComment($txt); + } }