]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/xmloutputter.php
change controlyourself.ca to status.net
[quix0rs-gnu-social.git] / lib / xmloutputter.php
index 5bbd35627eb5a1650ab1d7773fff92723ef4b6b1..d7bb1bf00619a66ec2ab337262a21dc77c8375b8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Low-level generator for XML
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Output
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @author    Sarven Capadisli <csarven@controlyourself.ca>
- * @copyright 2008 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Sarven Capadisli <csarven@status.net>
+ * @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')) {
@@ -40,11 +40,11 @@ if (!defined('LACONICA')) {
  * an element.
  *
  * @category Output
- * @package  Laconica
- * @author   Evan Prodromou <evan@controlyourself.ca>
- * @author   Sarven Capadisli <csarven@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Sarven Capadisli <csarven@status.net>
  * @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);
+    }
 }