1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
- }
- class XMLStringer extends XMLOutputter
- {
- public function __construct($indent = false)
- {
- $this->xw = new XMLWriter();
- $this->xw->openMemory();
- $this->xw->setIndent($indent);
- }
- public static function estring($tag, $attrs = null, $content = null)
- {
- $xs = new XMLStringer();
- $xs->element($tag, $attrs, $content);
- return $xs->getString();
- }
-
- public function getString()
- {
- return $this->xw->outputMemory();
- }
- }
|