getOutput() public method

Returns the XML|WBXML output once processing is finished.
public getOutput ( ) : string
return string The XML or WBXML output data.
Beispiel #1
0
        $this->state->authenticated = true;
    }
    public function addEntry($databaseURI, $content, $contentType, $cuid)
    {
        echo "Adding {$cuid} of {$contentType} to {$databaseURI}:\n{$content}\n";
    }
    public function replaceEntry($databaseURI, $content, $contentType, $cuid)
    {
        echo "Replacing {$cuid} of {$contentType} in {$databaseURI}:\n{$content}\n";
    }
    public function deleteEntry($databaseURI, $cuid)
    {
        echo "Deleting {$cuid} from {$databaseURI}\n";
    }
}
if (!isset($argc)) {
    die("argv/argc has to be enabled.\n");
}
if ($argc != 2) {
    die('Usage: ' . basename($argv[0]) . " syncml_client_nn.[wb]xml\n");
}
$backend = new Backend(array());
$sync = new Horde_SyncMl_ContentHandler();
$sync->debug = true;
$sync->process(file_get_contents($argv[1]), strpos($argv[1], '.wbxml') ? 'application/vnd.syncml+wbxml' : 'application/vnd.syncml');
$output = $sync->getOutput();
if (function_exists('tidy_repair_string')) {
    $output = tidy_repair_string($output, array('indent' => true, 'input-xml' => true, 'output-xml' => true));
}
echo $output, "\n";
@session_destroy();